Posts

Showing posts from December, 2016

AngularJs - Simple Example

In Angular "-" is used because HTML specification says that anything with - will not be parsed by HTML. Means If you will use - in element naming then other needs to parse it. So in thins case Angular will parse elements. $scope - Is a Angular Service for a scope management. As per the following code, Each ng-controller scope is different. $scope is parameter for your function and angular will inject $scope object into your function. $rootScope - Application have only one rootScope and which is global. This code will create object of customer class  and this controller will have his scope under that scope he do have access to Customer Name and Customer Code.  <div  ng-controller ="customerObj">  $scope.$watch ("CustomerAmount", function() - This is the customer watch code ng-App - In one HTML file you can have only one ng-app. ::  is considered a one-time expression. One-time expressions will stop recalculating once they are stable,