I am new to angular2 ( even don't know angular). In was working with golden layout and ag-grid.
I need to use DynamicComponentLoader
so I used:
import {ApplicationRef, Directive, ElementRef, Input, DynamicComponentLoader, ComponentRef, Injector} from '@angular/core';
But I am getting an error as:
89:151-173 "export 'DynamicComponentLoader' was not found in '@angular/core'
So, how can I import this? Do I need to add it from somewhere?
I also don't understand the difference in importing from @angular/core
and importing from angular2/core
. (sorry if this sounds stupid), but I see some projects use 'angular2/core' while some '@angular.core'. Can we sue both? because DynamicComponentLoader
is available in angular2/core
.