angularjs select通过动态加载option有空白项

<select ng-model="countrys" ng-init="countrys=countries[0]" ng-options="country.name for country in countries"></select>

 只需要添加ng-init就可以进行处理 

posted @ 2019-05-10 16:36  爱尚丽明  阅读(192)  评论(0编辑  收藏  举报