Hello World!
<!doctype html>
<html ng-app> <head> <script> function MyCtrl($scope) { $scope.visible = true; $scope.toggle = function() { $scope.visible = !$scope.visible; }; } </script> </head> <body ng-app> <div ng-controller="MyCtrl"> <button class="btn" ng-click="toggle()">Toggle</button> <p ng-show="visible">Hello World!</p> </div> </body> </html> |