【发布时间】:2016-08-18 11:48:23
【问题描述】:
我试图在控制器中获取 $scope.selectedBranch 但它没有更新。如果我在 HTML 中使用 $scope.selectedBranch 它工作正常。
<select ng-model="selectedBranch" ng-change="onBranchChange()" ng-options="branch for branch in data.branches"
全部
$scope.onBranchChange= function(){
console.log($scope.selectedBranch)
};
data = {"branches" : ["343dfds","dfdf43","sdfsd","sadser343"]}
【问题讨论】:
标签: angularjs select ng-options