Is it possible to have multiple ng-app directives on a single page in AngularJS?

No. You can auto-bootstrapped only one AngularJS application per HTML document. However, the first ngApp found will be used by default to define the root element to auto-bootstrap. Yet, if another ng-app directive gets placed, then it will not be processed by AngularJS. In this case, you should manually bootstrap the second app instead of using the second ng-app directive.

Suggest An Answer

No suggestions avaliable!

Related Interview Questions