<select><option>标签内无法获取到选中选项的值。
<div><p>机构</p>
<select class="label button button-block">
<option value="" >请选择机构</option>
<option ng-repeat="institution in institutions">
{{institution.name}}</option>
</select>
</div>
求教,如何获取到这个选中的institution呢?是加ng-modal ng-selected还是换标签呢? <form novalidate> <div class="list list-inset"> <label class="item item-input"> <i class="icon ion-search placeholder-icon"></i> <input type="text" placeholder="搜索" ng-model="search.Sname" ng-change="change()"> </label> </div> <div class="row"> <div class="col col-33" style="text-align:center;"> <select ng-model="company.Cname" class="select"> <option value="">请选择</option> <option ng-repeat="c in companies" value="{{c.cid}}">{{c.cname}}</option> </select> </div> <div class="col col-33" style="text-align:center;"> <select ng-model="type.Tname" class="select"> <option value="">请选择</option> <option ng-repeat="t in insurance" value="{{t.tid}}">{{t.tname}}</option> </select> </div> <div class="col col-33" style="text-align:right;"> <button class="button button-small button-positive" ng-click="search()"> 搜索 </button> </div> </div> </form> <pre ng-show="false">{{search}}</pre> <pre ng-show="false">{{company}}</pre> <pre ng-show="false">{{type}}</pre> controller:$scope.companies = [{"cid":"1","cname":"平安"},{"cid":"2","cname":"华夏"}];$scope.insurance = [{"tid":"11","tname":"产险"},{"tid":"12","tname":"寿险"}];
$scope.search = {};
$scope.company = {};
$scope.type = {};
$scope.change = function () {
$http({
method:"POST",
url:'http://10.200.47.69:80/myApp/policy/search',
params:{page: 1,count: 10,content:$scope.search.Sname,cname:$scope.company.Cname,tname:$scope.type.Tname}
}).success(function(data) {
vm.messages = data.items;
});
};
select加ng-modal吧。。
页:
[1]