AngularJS Basic

// Define your module. Your module will contain all your
// AngularJS components, including your controllers,
// directives and services.

// Don't forget the square brackets [] when you define
// your module.
var module = angular.module("myModule", []);

// Define you controllers. You bind these to your HTML
// elements using the "ng-controller" attribute.
//
// The $scope  is how you share data and functions
// between the HTML and your controller.
module.controller("myController", function($scope) {
$scope.message = "Hello World";

  $scope.changeMessage = function() {
    // when you change a variable in the $scope
    // the UI is automatically updated with the change
$scope.message = "Hello Universe!";
  };
});


    You clicked the button {{clickCount}} times.
   

angular.module("MyModule", [])
    .controller("MyController", function($scope) {
        $scope.clickCount = 0;

        $scope.userClick = function() {
            $scope.clickCount++;
        };

    });

Comments

Popular posts from this blog

Travel RESUME CV

PTE