Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy AngularJS Tutorials</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> </head> <body> <div ng-app="myApp" ng-controller="disabledCtrl"> <h3>ng-disabled directive in AngularJS Tutorial</h3> Enter the text:<input type="text" ng-disabled="value"><br/><br/> <button ng-click="value = !value"> Disable Text box</button> <p>Click here toggle to make the input field is disabled or not </p> </div> <script> var App = angular.module('myApp', [] ); App.controller('disabledCtrl', function($scope) { $scope.value = false; }); </script> </body> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.