CSS Classes used by AngularJS

AngularJS is a structural framework for dynamic web application.

AngularJS version 1.0 was released in 2012.

Miško Hevery, a Google employee, started to work with AngularJS in 2009.

The idea turned out very well, and the project is now officially supported by Google.

example of AngularJs

  1. < div ng - app ng - init = "qty=1;cost=2" > < b > Invoice: < /b>   
  2. <div>   
  3. Quantity:   
  4. <input type="number" min="0" ng-model="qty">   
  5. </div > < div > Costs: < input type = "number"  
  6. min = "0"  
  7. ng - model = "cost" > < /div>   
  8. <div>   
  9. <b>Total:</b > {  
  10.     {  
  11.         qty * cost | currency  
  12.     }  
  13. }  
  14.   
  15. < /div>   
  16. </div >
This is sample example of angularjs

CSS classes used by angular

ng-scope

Usage: angular applies this class to any element for which a new scope is defined. (see scope guide for more information about scopes)

ng-isolate-scope

Usage: angular applies this class to any element for which a new isolate scope is defined.

ng-binding

Usage: angular applies this class to any element that is attached to a data binding, via ng-bind or {{}} curly braces, for example. (see databinding guide)

ng-invalid, ng-valid

Usage: angular applies this class to a form control widget element if that element's input does not pass validation. (see input directive)

ng-pristine, ng-dirty

Usage: angular ngModel directive applies ng-pristine class to a new form control widget which did not have user interaction. Once the user interacts with the form control, the class is changed to ng-dirty.

ng-touched, ng-untouched

Usage: angular ngModel directive applies ng-untouched class to a new form control widget which has not been blurred. Once the user blurs the form control, the class is changed to ng-touched.

Then also use a ng control like

ng-model

ng-hide

ng-show

ng-app

ng-controller

ng-click

This all are common ng controller.

https://docs.angularjs.org/guide

Thank you

Ebook Download
View all
Learn
View all