2016-10-03 4 views
1

私はエラー(角2)

import { Component, HostListener, ViewContainerRef, ViewChild, ComponentResolver } from '@angular/core'; 

を "ComponentResolver" をインポートしようとしていると私はエラーがあります:

Module '"/home/maksym/untill/trunk/unTill.Modern/Code/AppRc6/node_modules/@angular/core/index"' has no exported member 'ComponentResolver'.

私の依存関係を:

"@angular/common": "~2.0.1", 
"@angular/compiler": "~2.0.1", 
"@angular/core": "~2.0.1", 
"@angular/forms": "~2.0.1", 
"@angular/http": "~2.0.1", 
"@angular/platform-browser": "~2.0.1", 
"@angular/platform-browser-dynamic": "~2.0.1", 
"@angular/router": "~3.0.1", 
"@angular/upgrade": "~2.0.1", 

どのように私はこの問題を修正するカムですか?

答えて

3

RC.6 2.0.0-rc.6 ComponentResolverが削除されました。

angular2の更新履歴毎

と共に動的コンポーネントを作成するため@NgModule.entryComponents又はANALYZE_FOR_ENTRY_COMPONENTSプロバイダと使用ComponentFactoryResolver

+0

あなたはentryComponentsの使用例をお持ちですか? –

+0

この回答の最初のオプションを参照してくださいhttp://stackoverflow.com/questions/39678963/load-existing-components-dynamically-angular-2-final-release/39680765#39680765 – yurzui

+0

ありがとう、本当に助けてくれました! –