Explain Directives in AngularJs ?

devquora
devquora

Posted On: Feb 22, 2018

 

AngularJS directives are extended HTML attributes with the ng prefix. The 3 main directives of angular js are:

  • ng-app:- directive is used to flag the HTML element that Angular should consider to be the root element of our application. Angular uses the spinal-case for its custom attributes and camelCase for the corresponding directives which implement them.
  • ng-model:- directive allows us to bind values of HTML controls (input, select, textarea) to application data. When using ngModel, not only change in the scope reflected in the view, but changes in the view are reflected back into the scope.
  • ng-bind:- directive binds application modal data to the HTML view.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions