AngularJs ng-app, ng-model and ng-controller

1). Important parts of AngularJs
i) ng-app

ng-app : - The ngApp directive are used to define the root element and the auto-bootstrapping to an application. It's called auto initialization process. If you have multiple angular apps (more than one ng-app) that time you set manually bootstrap.

ng-model :- The ngModel directive are used to bind the custom form control(input, select, textarea) to a property.

The ngModel is responsible for:-
·         Bind the views to the model.
·         Validate the form control (just like required, number, email and URL validation etc.)
·         Keep the state of valid controls
·         Setting of CSS classes (just like ng-valid, ng-invalid etc.)


ng- controller :-  The ngController directive are used to link the angular controller to the HTML Views.

For EXAMPLE,

About Blogger

ANIL SINGH

Hey! I am Anil Singh. I am Active Blogger, Writer and Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
http://www.code-sample.com
http://www.code-sample.xyz

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book