Angularjs Select获取数组下标
时间:2019-07-26 15:44:12
收藏:0
阅读:207
一、定义资源
//资源类型 $scope.status=[‘项目测试‘,‘开发工具‘,‘安装包‘,‘工作计划‘,‘测试项目‘,‘我的游戏‘,‘我的音乐‘,‘博客首页图片‘];
二、没错直接用 {{$index}} 获取即可
资源类型:<select style="width: 150px;height: 25px;" ng-model="searchEntity.type" > <option ng-repeat="x in status" value="{{$index}}">{{x}}</option> </select>
原文:https://www.cnblogs.com/zeussbook/p/11250552.html
评论(0)