首页 > 其他 > 详细

ng-repeat && ng-options的故事

时间:2015-08-13 15:38:33      阅读:85      评论:0      收藏:0      [点我收藏+]
ng-repeat && ng-options的故事
 

 <select class="input-small" ng-model="newHost.os"

               style="width:102px;" ng-show="osType==2">
                <option ng-repeat="item in osList.Linux" value="{{item.id}}">{{item.name}}</option>
 </select>
 
<select class="input-small" ng-model="newHost.os"  style="width:102px;" ng-show="osType==2" ng-options="item.id as item.name for item in osList.Linux" ng-init="osList.Linux[0].id">
 </select> 
 
为了兼容性问题请用这一款~~哈哈~~

ng-repeat && ng-options的故事

原文:http://www.cnblogs.com/direction/p/4727452.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!