3

私はAngular 2 + TypeScriptで作業します。現在、angular2-busyを追加するために進行中です。Angular2動的コンポーネント

このライブラリでは、angular2-dynamic-componentを含める必要がありますが、どうすればいいのか分かりません。

これは enter image description here

これは、アプリケーション・モジュール

import {BusyModule} from 'angular2-busy/build/src'; 
import {DynamicComponentModule} from 'angular2-dynamic-component' 

@NgModule({ 
imports: [   
    BusyModule, 
    DynamicComponentModule 
], 

は何が問題になっていて、どのようにそれを修正するエラーのですか?

UPDATE angular2ビジー/ busy.component.js

BusyComponent = __decorate([ 
    core_1.Component({ 
     selector: 'ng-busy', 
     template: "\n  <div [class]=\"wrapperClass\" *ngIf=\"isActive()\" @flyInOut>\n   <DynamicComponent [componentTemplate]=\"template\" [componentInputData]=\"context\">\n   </DynamicComponent>\n  </div>\n ", 
     animations: [ 
      core_1.trigger('flyInOut', [ 
       core_1.transition('void => *', [ 
        inactiveStyle, 
        core_1.animate(timing) 
       ]), 
       core_1.transition('* => void', [ 
        core_1.animate(timing, inactiveStyle) 
       ]) 
      ]) 
     ] 
    }), 
    __metadata('design:paramtypes', [promise_tracker_service_1.PromiseTrackerService]) 
], BusyComponent); 
return BusyComponent; 

エラーが表示されたところです。

+0

「angular2ダイナミックコンポーネント」とは何ですか? –

+0

この[componentInputData]属性で何を達成しようとしていますか?それがその指示であると仮定すると、https://www.npmjs.com/package/angular2-dynamic-componentにそのような属性が記載されていません。 –

+0

私はなぜそれが必要なのかわかりませんが、そうでない場合は、いくつかの命題がある場合はangular2-busyを含めることができません。 –

答えて

2

私も前にこの問題を抱えていた、と私は次のように削除して、それを解決:

<DynamicComponent [componentTemplate]=\"template\" [componentInputData]=\"context\">\n   </DynamicComponent>\n  </div>\n 
+0

それはハックです、我々はこれを行うことはできません –

関連する問題