HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
AngularJS HTML event has its own instruction.
ng-click directive defines AngularJS click event.
ng-hide directive sets application part is visible.
ng-hide = "true" Setting HTML elements are not visible.
ng-hide = "false" Setting HTML element is visible.
Application Analysis:
The first part personController controller section similar.
Application has a default attribute: $ scope.myVar = false;
ng-hide instruction sets <p> element and two input fields are visible, depending on the value of myVar (true or false) set is visible.
toggle () function is used to switch the value of myVar variable (true and false).
ng-hide = "true" so that element is not visible.
ng-show instruction can be used to set whether the application portion of the visible.
ng-show = "false" you can set HTML elements are not visible.
ng-show = "true" can set the HTML element is visible.
The following example uses ng-show command: