0

我是 angular2 的新手(甚至不知道 angular)。In 正在使用黄金布局ag-grid

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

import {ApplicationRef, Directive, ElementRef, Input, DynamicComponentLoader, ComponentRef, Injector} from '@angular/core';

但我收到一个错误:

89:151-173 “在‘@angular/core’中找不到导出‘DynamicComponentLoader’

那么,我该如何导入呢?我需要从某个地方添加它吗?

我也不明白 import from@angular/core和 import from的区别angular2/core。(对不起,如果这听起来很愚蠢),但我看到一些项目使用'angular2/core'而一些'@angular.core'。我们可以起诉两者吗?因为DynamicComponentLoaderangular2/core.

4

0 回答 0