Javatpoint Logo
Javatpoint Logo

AngularJS ng-app Directive

The AngularJS ng-app specifies that it is the root element of the AngularJS application. All AngularJS application must contain a root element. You can only have one ng-app directive in your HTML document. If you have more than one ng-app directive; the first appeared directive will be used.

Syntax:

Parameter explanation:

modulename: It is an optional parameter. It specifies the name of a module that you want to add with the application.

See this example:

Test it Now

Note: ng-app is the simplest, easiest and most common way to bootstrap an application.





Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA