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