ng-repeat not working

工作中遇到使用datatable=”ng”及ng-repeat某區塊有時會顯示,有時又消失

<table datatable=“ng” class=“table table-striped” width=“100%”>

    <thead>
   
<tr>
       
<th  data-localize=“time”>AAA</th>
       
<th  data-localize=“editor_name”>BBB</th>
       
<th  data-localize=“content_detail_label”>CCC</th>
   
</tr>
   
</thead>
   
<tbody>
   
<tr ng-repeat=list in history|filter:updatei18n()”>
       
<td>{{list.AAA | date:’yyyy-MM-dd HH:mm’}}</td>
       
<td>{{list.BBB}}</td>
       
<td><a class=“check-modal” data-toggle=“modal” data-target=“#contentModal” data-localize=“content_detail”>CCC</a>         </td>
   
</tr>
   
</tbody>
</table>

此區塊無法顯示,似乎是因為同步問題,在js加上timeout,讓時間延遲一秒

$timeout(function() {

call API
}, 100);

 

在〈ng-repeat not working〉中有 10 則留言

  1. 嗨,这篇文章自己以为十分有意思,请问博主能够让我转走吗?我会保存原文来由的链接以及你的姓名.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *