【问题标题】:Error with importing ComponentResolver in component ( Angular 2 )在组件中导入 ComponentResolver 时出错(Angular 2)
【发布时间】:2017-02-11 06:55:12
【问题描述】:

我正在尝试导入“ComponentResolver”

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

我有错误:

模块 '"/home/maksym/untill/trunk/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",

我该如何解决这个问题?

【问题讨论】:

    标签: angular dependency-injection


    【解决方案1】:

    由于 RC.6 2.0.0-rc.6 ComponentResolver 已被删除。

    每个 angular2 更改日志

    ComponentFactoryResolver@NgModule.entryComponentsANALYZE_FOR_ENTRY_COMPONENTS 提供程序一起使用以创建动态组件。

    【讨论】:

    猜你喜欢
    • 2017-11-02
    • 2016-09-26
    • 2016-11-14
    • 2017-08-29
    • 1970-01-01
    • 1970-01-01
    • 2015-09-01
    • 2018-03-28
    • 2016-11-03
    相关资源
    最近更新 更多