Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src= "../../ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> </head> <body> <div ng-app="" ng-controller="personController"> <button ng-click="toggle()">Hide user</button> <p ng-hide="myVar"> First Name: <input type=text ng-model="firstName"><br> Last Name: <input type=text ng-model="lastName"><br><br> Full Name: {{firstName + " " + lastName}} </p> </div> <script> function personController($scope) { $scope.firstName = "John", $scope.lastName = "Doe" $scope.myVar = false; $scope.toggle = function() { $scope.myVar = !$scope.myVar; }; } </script> </body> <!-- Mirrored from www.w3schools.com/angular/tryit.asp?filename=try_ng_events_hide by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:30:48 GMT --> </html>
Result:
Try it Yourself - © w3schools.com