鍍金池/ 問答/HTML5  HTML/ angular4中如何監(jiān)聽*ngFor是否遍歷完

angular4中如何監(jiān)聽*ngFor是否遍歷完

<html>

<ion-list>
    <ion-item *ngFor='let i of list'></ion-item>
</ion-list>

</html>

我如何監(jiān)聽 ngFof是否遍歷完這個數(shù)組呢?

回答
編輯回答
離夢

監(jiān)聽這個干嘛。。。

2018年5月12日 07:47
編輯回答
萌吟

試下ionViewDidEnter這個生命周期函數(shù)。

2017年3月26日 06:51
編輯回答
萌面人

那應該是ion-list組件完全解析完成之后調用,在生命周期鉤子里面執(zhí)行吧,具體哪個查查文檔,可能還要寫在異步里面

2018年8月25日 18:35