0
我只想顯示其數據來自API的列表項目。我想用一種標準的方式,只顯示那些數據是從API使用ng-hide在角度數據的基礎上隱藏列表項目
[
{
"_id": "57998a58d5692e2b00e5de9f",
"query_string": "snowy",
"query_type": "others",
"timestamp": "2016-07-28T04:30:16.624Z",
"__v": 0,
"social_media": [
6,
1
]
},
{
"_id": "5799aedad5692e2b00e5df37",
"query_string": "Edhi",
"query_type": "others",
"timestamp": "2016-07-28T07:06:02.113Z",
"__v": 0,
"social_media": [
1,
6,
2,
4,
3
]
},]
未來
<div class="row" ng-repeat="query in prev_queries">
<div class="col-md-12 cell">
<div class="well" >
<p class="history">{{query.query_string}}</p>
<ul class="history-filter">
<li ng-hide="true"> <i class="fa fa-twitter fa-2x" aria-hidden="true"></i> </li>
<li ng-hide="true"> <i class="fa fa-facebook fa-2x" aria-hidden="true"></i> </li>
<li ng-hide="false"> <i class="fa fa-instagram fa-2x" aria-hidden="true"></i> </li>
<li ng-hide="true"> <i class="fa fa-youtube fa-2x" aria-hidden="true"></i> </li>
<li ng-hide="false"> <i class="fa fa-flickr fa-2x" aria-hidden="true"></i> </li>
</ul>
<p class="history-time"> {{query.timestamp | date}}</p>
<span class="pull-right"> <span class="bigcheck">
<label class="bigcheck">
<input type="checkbox" class="bigcheck" onchange="showHideIndividualAttributes(this); return false" value="1" />
<span class="bigcheck-target"></span> </label>
</span> </span>
</div>
</div>
</div>
數據在上述情況下只顯示其數據存在social_media數組列表項。有沒有這種使用NG-重複
@usama是露出太多的清單項目,而隱藏它們。我猜ng-repeat-start不在正確的位置 – user2885910
nope它的工作正常我正在糾正我的語法錯誤這是equall符號我在ng中失蹤 - 如果 –
喲它的工作非常感謝 – user2885910