Letting angular handle the initialization process (bootstrapping) is a handy way to start using angular, but advanced users who want more control over the initialization process can choose to use the manual bootstrapping method instead.
The best way to get started with manual bootstrapping is to look at the what happens when you use
ng:app
, by showing each step of the process
explicitly.
<!doctype html> <html xmlns:ng="http://angularjs.org"> <head> <script src="http://code.angularjs.org/angular.js"></script> <script> angular.element(document).ready(function() { angular.bootstrap(document); }); </script> </head> <body> Hello {{'World'}}! </body> </html>
This is the sequence that your code should follow if you bootstrap angular on your own:
api/angular.bootstrap
to compile the template into
an executable, bi-directionally bound application.