我正在尝试导入“ComponentResolver”
import { Component, HostListener, ViewContainerRef, ViewChild, ComponentResolver } from '@angular/core';
我有错误:
模块'“/ home / maksym / untill / strunk / unTill.Modern / Code / AppRc6 / node_modules / @ angular / core / index”'没有导出成员'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",
我如何解决此问题?
答案 0 :(得分:3)
自RC.6 2.0.0-rc.6 ComponentResolver
被删除。
每个angular2更改日志
与ComponentFactoryResolver
或@NgModule.entryComponents
提供程序一起使用ANALYZE_FOR_ENTRY_COMPONENTS
进行动态组件创建。