AngularJS Directives

1.What are directives?

Directives are markers on a DOM element which attach a special behavior to it.

 

Angular JS directives are extended with prefix ng-

ng-app
ng-init
ng-model

 

2.What is data binding?

Data binding means combining data.

{ajs-dirdatabinding}

 

3. What is ng-app Directive?

The ng-app directive is initialized an angular Js application.

{ajs-ng-appdirec}

 

4.What is ng-inti directive?

The ng-init directive defines initial values for application data.

{ajs-ngintidirec}