Angular 出口';DynamicComponentLoader&x27;在'@角/芯

Angular 出口';DynamicComponentLoader&x27;在'@角/芯,angular,golden-layout,Angular,Golden Layout,我对angular2不熟悉(甚至不知道angular2)。在中,他与和一起工作 我需要使用DynamicComponentLoader,所以我使用了: import {ApplicationRef, Directive, ElementRef, Input, DynamicComponentLoader, ComponentRef, Injector} from '@angular/core'; 但我得到了一个错误: 89:151-173在“@angular/core”中未找到导出“Dynam

我对angular2不熟悉(甚至不知道angular2)。在中,他与和一起工作


我需要使用
DynamicComponentLoader
,所以我使用了:

import {ApplicationRef, Directive, ElementRef, Input, DynamicComponentLoader, ComponentRef, Injector} from '@angular/core';
但我得到了一个错误:

89:151-173在“@angular/core”中未找到导出“DynamicComponentLoader”

那么,我如何导入它?我需要从某处添加它吗


我也不明白从
@angular/core
导入和从
angular2/core
导入的区别(如果这听起来很愚蠢,我很抱歉),但我看到一些项目使用“angular2/core”,而另一些项目使用“@angular2.core”。我们可以同时使用它们吗?因为
angular2/core
中提供了
DynamicComponentLoader

DynamicComponentLoader
。请看这里..谢谢@Pengyy。但angular2/core中提供了它。实际上有什么区别?导入像de>angular2/core在2.0.0-rc.0版本中被弃用。在这类东西中可以看到更改日志,因为旧的Tuto可能会使用弃用的东西:)