angular ng-model 綁定的值不更新代碼主要部分如下// html代碼<div class="form-group">
<label>Slot : </label>
<select class="form-control" ng-model="selectedSlot" ng-options="slot for slot in slotlist"></select>
</div>//javascript代碼$scope.slotlist = ['Flash Ads', 'Native Ads', 'Lock Ads'];
$scope.selectedSlot = $scope.slotlist[0];如代碼所示,為什么我改變下拉框的值時,$scope.selectedSlot 并沒有動態改變?是不是因為$scope.selectedSlot是數組的一個值,相當于常量?求詳細解答
angular ng-model 綁定的值不更新
夢里花落0921
2018-08-06 11:10:59