The
ng-app directive is used to
initialize / bootstrap an AngularJS
application in a HTML page, we
should declare the ng-app directive in the HTML, Body or DIV tag based on where
we plan to use AngularJS directives in the page. Without adding the ng-app directive the other AngularJS
directives / expressions will not work.
There can be only one ng-app defined in a page, to have multiple applications in a single HTML page we should manually bootstrap the page using angular.bootstrap.
For a simple application we can just specify the ng-app directive in the HTML, Body or div tags without any specific names as follows.
The following is a simple example using ng-app
There can be only one ng-app defined in a page, to have multiple applications in a single HTML page we should manually bootstrap the page using angular.bootstrap.
For a simple application we can just specify the ng-app directive in the HTML, Body or div tags without any specific names as follows.
The following is a simple example using ng-app