Steps in Angular Bootstrap Process

When the Angular application runs these are the steps involved in the Bootstrap of the Angular application. 

  • When DOM is loaded into the page the angular script first looks for ng-app directive.

  • Angular Js framework code Creates $injector object and injects dependencies needed for the module of the applications

  • The Injector object will create the rootscope object which is a global object to the angular applications.

  • The injector creates a compile service object which compiles static html template.

  • The compile service compiles DOM and binds html elements. 

We can manually bootstrap angular using angular.bootstrap() function. On document ready we need to call the below code. No need to define ng-app in html.

  1. angular.element(document).ready(function () {  
  3.    angular.bootstrap(document, ['myApp']);  
  5. });  
  7. Hope   

You now have the steps involved in the Angular Bootstrap process. Thanks for reading.