标签:cli scope 否则 span primary value sub str label
ng-bind是从$scope -> view的单向绑定
ng-modle是$scope <-> view的双向绑定
<form role="form" class="form-inline">
<div class="form-group"> <label for="nj">年级:</label> <select name="nj" id="nj" class="form-control" ng-model="myNJ">> <option ng-repeat="op in njs " value="{{op.id}}">{{op.name}}</option> </select> </div>
<div class="form-group"> <label for="zy">年级:</label> <select name="zy" id="zy" class="form-control" ng-model="myZY"> <option ng-repeat="op in zys " value="{{op.id}}">{{op.name}}</option> </select> </div>
<button type="submit" class="btn btn-primary" id="chaxun" ng-click="fn1()" >查询</button> </form>
要想获取select的值,使用ng-modle,否则无法获取select 的值
标签:cli scope 否则 span primary value sub str label
原文地址:https://www.cnblogs.com/qqhfeng/p/11407500.html