1
我在角和離子方面有一個奇怪的問題。退出到另一個狀態時,我再次調用「ifPostExcluded」。ng-repeat在狀態變化時運行
當中繼器完成加載(注意我有自己的指令「on-finish-render」)來檢測這個時,也會調用它。
<div ng-repeat="post in postList" on-finish-render="ngRepeatFinished">
<div class="{{post.id}}" ng-if="post.cat.length > 0">
<div class="w-col w-col-4 push-block-wrap" ng-if="ifPostExcluded(post.cat, post.id)">
<div ng-include src="'templates/_loop.html'"></div>
</div>
</div>
我對此感到困惑不解。我發現this neat solution,但在實施之前,我寧願嘗試解決問題。
你用'collection-repeat'試過了嗎? – e666
@ e666好點將嘗試看到我有所作爲 – Jason
@ e666這沒有奏效。我將不得不深入調試,但感謝您的幫助。 – Jason