Angularjs 标签使用整理

持续更新.....

一、select

setmealList为接收到的集合数据,sname 是要显示的字段,Object属性
 套餐类型:<select style=" 150px;height: 25px;" ng-model="searchEntity.sid" ng-options="item.sid as item.sname for item in setmealList">
    </select>

二、遍历数组(集合)根据编号显示名称

$scope.playstatus=['未支付','已支付'];//js定义的数组名称,注意下标从0开始
<td>{{playstatus[info.payresult]}}</td>
setmealList是从后台接收到的集合数据,注意下标从0开始。中括号内不支持运算符
<td>{{setmealList[info.sid].sname}}</td>
原文地址:https://www.cnblogs.com/zeussbook/p/11316175.html