The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

352229 (9) [Avatar] Offline
#1
Hi

I have read in various articles that ng-app is for auto-bootstrapping the angular.js application. I have searched the meaning of autobootstrapping. It means auto initialization (make sense to me). Now there is another line which I have read.- If you have defined ng-app on a div then it means that ng-app is defining the owner of angular.js. This line goes over my head.

Please help me in understanding this line.
Lukas Ruebbelke (107) [Avatar] Offline
#2
Angular will only live within the element that you declare ng-app on. Most people want their entire page to be an Angular app and so it is common to declare ng-app on the HTML or BODY tags. In some cases you only want Angular to live in a small portion of the page such as a specific div and so you would declare ng-app just on that element.