Tutorialsplane

AngularJs ng-app


AngularJs ng-app directive : AngularJs ng-app directive is used to define the root of the application. It is used to initialize the application automatically when the page loads

Syntax : AngularJs ng-app

<div ng-app="">

</div>

Note you can give your ng-app name .

Example

<div ng-app="MyApp">

</div>

Let us understand with simple example

Example 1




    



<div ng-app="" ng-init="name = 'Tani'">
    <p>Name : </p>
    <p> {{name}}</p>

</div>


Try it »

Tutorial

Expressions

AngularJs Directives

Controllers

AngularJs Filters

Http Methods

AngularJs Tables

Events

AngularJs Modules