Ng-Disable-8

 
In this example we have a button "Disable" when you click on this button, the button will disable and a new button with text "Enable" shows when you click on the Enable button the "Disable" button gets enable and "Enable" button will hide.
 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app="app"> <div ng-controller="controllerName" ng-init="isDisabled=false"> <button ng-click="disableClick(isDisabled)" ng-disabled="isDisabled">Disable</button> <button ng-click="disableClick(isDisabled)" ng-show="isDisabled">Enable</button> </div> <script> var app = angular.module("app", []); app.controller('controllerName', ['$scope', function ($scope) { $scope.disableClick = function (isDisabled) { $scope.isDisabled = !isDisabled; } }]); </script> </body> </html>
Output