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

해킹입니다. 우리는 이것을 할 수 없습니다. –

관련 문제