【发布时间】:2016-12-30 17:58:26
【问题描述】:
我有问题返回值ng-model="selectStates" 在重复中选择!
在此评论的地方,是另一次尝试。
<div ng-controller="coursesCtrl">
<form name="formFilters" id="formFilters">
<div ng-repeat="filter in filters">
<div ng-switch="filter.type">
<div ng-switch-when="dropdown">
<h5 class="menu-filter-sidebars--title">{{filter.title}}</h5>
<select name="selectStates" id="selectStates" ng-options="option.name for option in filter.inputs" **`ng-model="selectStates"`** >
<!-- <option value="" > Selecione o Estado </option>
<option data-ng-repeat="item in filter.inputs" value="{{item.uf}}">{{item.Estado+' - '+item.uf}}</option> -->
</select>
</div>
</div>
</div>
</form>
<div class="test" > {{selectStates}} </div>
</div>
【问题讨论】:
-
分享您的 JSON 对象以轻松调试
标签: angularjs angularjs-scope angular-ngmodel