我试图在表单上使用angularjs bootstrap下拉切换,我需要能够将所选项目绑定回我的应用程序中新"组织"的模型.
这是我用来创建所有控件的js模块:
var Controls = angular.module('PulseControls', ['ui.bootstrap']); var booleanButtonCtrl = function($scope) { $scope.radioModel = true; }; var currencyDropDownButtonCtrl = function($scope) { $scope.currencies = [{ id: 1, name: 'US Dollar' }, { id: 2, name: 'Euro' }, { id: 3, name: 'Australian Dollar' }]; };
这是我的CreateNewOrganisation控制器的起始代码
function CreateOrganisationController($scope, $http, $window) { $scope.newOrganisation = { isActive: true, };
最后,这是我的html代码片段,其中包含一个for"Status"和一个for Currency,两者都使用ui-bootstrap ...
在Status中采用的方法运行良好,但我无法让Currency的下拉控件工作.有什么建议?