The ng-disabled directive binds the application data directly to the disabled property of the HTML.
The ng-show directive is used to set whether the app part is visible.
ng-show= "True" to set the HTML element to be visible.
ng-show= "false" setting HTML element is not visible.
The ng-hide directive is used to set whether the app part is visible.
ng-hide= "true" setting HTML element is not visible.
ng-hide= "false" to set the HTML element to be visible.
Instance:
1 <!DOCTYPE HTML>2 <HTML>3 <Scriptsrc= "Http://apps.bdimg.com/libs/angular.js/1.3.9/angular.min.js"></Script>4 <Body>5 6 <DivNg-app= "MYAPP"Ng-controller= "Personctrl">7 8 <ButtonNg-click= "Toggle ()">Hide/Show</Button>9 Ten <PNg-hide= "MyVar"> OneName:<inputtype=textNg-model= "FirstName"><BR> AName:<inputtype=textNg-model= "LastName"><BR><BR> - Name: {{firstName + "" + LastName}} - </P> the - </Div> - - <Script> + varapp=Angular.module ('myApp', []); - App.controller ('Personctrl', function($scope) { + $scope. FirstName= "John", A $scope. LastName= "Doe" at $scope. MyVar= false; - $scope. Toggle= function() { - $scope. MyVar= !$scope. MyVar; - } - }); - </Script> in - </Body> to </HTML> +
AngularJS Html+dom+ng-click Events