AngularJS directives


AngularJS directives are special attributes on a HTML element that tell AngularJS to attach a specified behavior to that HTML element. These attributes starting with ng- prefix. AngularJS built in directoves are following

  • ng-app directive initializes an AngularJS Application.
  • ng-init directive initializes application data.
  • ng-model directive binds the value of HTMLform element (textbox, select, textarea, checkbox and radio button).
  • ng-repeat directive repeats html elements for each item in a collection.

Example

Add to Card:
Product:  
Quantity:
Cost: