Thursday, October 27, 2016

AngularJS




 Basic flow when bootstrapping an angular application :-




When a browser renders a page, it essentially reads the HTML markup, creates a DOM and broadcasts an event when the DOM is ready.

Dotted line explaining the flow of angular. It is important to note that ng-app directive is included in your html.

Once the application is under control of angular, it will start the compilation of DOM. And angular will figure out any special task is assign to the DOM elements (nothing but directives).

Angular will find out all the directives including the custom directives and make a list based on its priority (I will explain the directives below). The execution of directives are based on the priority order.

sample example :-
https://plnkr.co/edit/W06coFjElFbx5abapm6s?p=preview





You can see in the above example, whatever marked with red color is important to proceed the angular execution.

angular.js : https://code.angularjs.org/1.4.0/angular.js

And also you can find ng-model (angular inbuilt directive).

Note: Whatever points mentioned above is for angularJS beginners and only covering the very basics and important points. 
If you have any question or suggestion put those in the comments.