答案 0 :(得分:0)
ng-model
指令比较对象引用而不是对象内容。对ng-model
值使用原始属性:
<select class="form-control" ng-model="empEdit.qualById"
ng-options="q.id as q.qualificationName for q in qualifications"
name="selQual1">
<option value="" disabled>
Choose your qualification
</option>
</select>
$scope.empEdit = {"name":"SomeName", "id": 2, qualById: 1};
有关更多信息,请参见