我想在点击按钮
时动态更改下拉选项HTML代码
<ul data-role="listview" data-inset="true">
<li ng-controller="exerciseTypeCtrl">
<select id="exerciseType" data-role="listview" ng-options="type as type.text for type in types.cast " ng-model="item" ng-change="update()">
</select>
</li>
</ul>
使用此JS
var myApp = angular.module('myApp',[]);
myApp.controller('exerciseTypeCtrl',function($scope,indoors,outdoors)
{
$scope.types = indoors;
$scope.update = function() {
}
});
默认情况下我绑定数据indoors
,我想在ng-click事件上绑定outdoors
数据,因此动态下拉更新
我在这个问题上需要帮助