ng-repeat && ng-options的故事

mac2022-06-30  34

ng-repeat && ng-options的故事  

 1.

<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>     2. 为了觉得ie8的兼容性问题请用这一款! <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>     

转载于:https://www.cnblogs.com/direction/p/4727452.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)