0

I'm trying to get loadIntoLocation working, but I keep get the error message,

Property 'loadIntoLocation' does not exist on type 'DynamicComponentLoader'.

I've looked at other examples and used plunker and it works there, but I can't seem to get it working locally. I grep'd the Angular2 core and could not find any mention of a loadIntoLocation function.

How do I find out what version of angular2 I'm using? Can I upgrade? I just used npm install to deploy my environment.

JohnathanKong
  • 1,307
  • 3
  • 21
  • 36

1 Answers1

3

That was removed a while ago as far as I remember. DynamicComponentLoader is deprecated anyway. Use ViewContainerRef.createComponent() instead.

For a full example see Angular 2 dynamic tabs with user-click chosen components

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • 2
    Thank you so much. A lot of information out there is outdated, so it's hard to keep track of what to use. I spent so much time trying to figure this out; should have posted this question sooner. – JohnathanKong Jun 17 '16 at 17:56