angularjs - Disable button in angular js -
i have 2 buttons in page "save set" & "load set". "save set" button has ng-disabled=issavedisabled()
..... .controller('saveloadsettoolbarbtn', ['$scope','$modal','propertiesmodified', function ($scope,$modal,propertiesmodified) { $scope.loadtuneset = function () { $modal.open({ templateurl: 'loadsetdlg.html', controller: 'loadsetctrl' }); }; $scope.issavedisabled = function() { homecoming !propertiesmodified.get(); }; .......
when click load set, open popup , i'll have ok button. on click, should disable "save set" button
ok button,
.controller('loadsetctrl', ['$scope', '$modalinstance', 'generaldataservice', function ($scope, $modalinstance, generaldataservice) { $scope.items = []; $scope.selectedset = undefined; $scope.ok = function () { //doing logic closedialog(); $modalinstance.close(); };
if value changes happen in page "save set" button enabled. problem if alter value in page button enabling (as expected). if click "load set" button, popup open , on ok button click (available on popup) "save set" should go disable state. should able homecoming boolean value true through issavedisabled function on ok button click.
simple:
<button ng-model="btnsaveset" ng-disabled="btnsaveset_disabled" ng-click="btnsaveset_disabled=true">saveset</button>
angularjs
No comments:
Post a Comment