Angularjs 標籤使用整理

持續更新.....數組

1、selectspa

setmealList爲接收到的集合數據,sname 是要顯示的字段,Object屬性
 套餐類型:<select style="width: 150px;height: 25px;" ng-model="searchEntity.sid" ng-options="item.sid as item.sname for item in setmealList">
    </select>

 

2、遍歷數組(集合)根據編號顯示名稱code

$scope.playstatus=['未支付','已支付'];//js定義的數組名稱,注意下標從0開始
<td>{{playstatus[info.payresult]}}</td>
setmealList是從後臺接收到的集合數據,注意下標從0開始。中括號內不支持運算符
<td>{{setmealList[info.sid].sname}}</td>
相關文章
相關標籤/搜索