Error during instantiation of AppComponent!.
There is no component directive at element [object Object]
It works on version beta.0:
http://plnkr.co/edit/p6w6bBZfkvXIdDabc1vI?p=preview
Its broken on version beta.1:
http://plnkr.co/edit/3Gn9ZuyMHUdlRqEmqVF7?p=preview
According to the breaking changes
Component view is not yet created when component constructor is called. -> use onInit lifecycle callback to access the view of a component
So moving your code to ngOnInit
works correctly
ngOnInit() {
this.dcl.loadIntoLocation(ChildComponent, this.elementRef, 'child');
}
@ericmartinezr Thanks.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
According to the breaking changes
So moving your code to
ngOnInit
works correctly