0

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.

Prashant Prabhakar Singh
  • 1,120
  • 4
  • 15
  • 33
  • `DynamicComponentLoader` has been deprecated. see here. http://stackoverflow.com/questions/38332249/angular-2-rc4-dynamiccomponentloader-deprecated. – Pengyy May 14 '17 at 15:16
  • Thanks @Pengyy. But it is available in angular2/core. What actually the difference? – Prashant Prabhakar Singh May 14 '17 at 17:34
  • imports like `angular2/core` is deprecated since 2.0.0-rc.0 https://github.com/angular/angular/blob/master/CHANGELOG.md#200-rc0-2016-05-02 It can be good to see the change logs in these kinds of things, since old tutos might use deprecated stuff :) – AT82 May 14 '17 at 18:14

0 Answers0