Error during instantiation of AppComponent!.
There is no component directive at element [object Object]
バージョンbeta.0で動作します:
http://plnkr.co/edit/p6w6bBZfkvXIdDabc1vI?p=preview
バージョンbeta.1で壊れています:
http://plnkr.co/edit/3Gn9ZuyMHUdlRqEmqVF7?p=preview
重大な変更によると
Component view is not yet created when component constructor is called. -> use onInit lifecycle callback to access the view of a component
したがって、コードをngOnInit
移動すると正しく機能します
ngOnInit() {
this.dcl.loadIntoLocation(ChildComponent, this.elementRef, 'child');
}
@ericmartinezrありがとう。
この問題は、非アクティブのために自動的にロックされています。
同様の問題または関連する問題が発生した場合は、新しい問題を提出してください。
自動会話ロックポリシーの詳細をご覧ください。
_このアクションはボットによって自動的に実行されました。_
最も参考になるコメント
重大な変更によると
したがって、コードを
ngOnInit
移動すると正しく機能します