1
我正在使用Angular 1.5。我有一個組件嵌入到另一個組件中,如下所示。問題是,data
變量尚未解決時,角火災component-child
,所以我什麼也沒有得到。如何在子組件實例化之前等待變量被解析。在實例化組件之前等待數據加載
HTML
<component-parent>
<component-child data="$ctrl.data._id"><\component-child>
</component-parent>
JS
this.data = SomeResource.get();
在那裏我正在尋找一個複雜的生命週期事物!咄! – Mika
始終保持簡單!很高興幫助。 – Chanthu