Learn Angular Js

Angular Js

Angular JS extends HTML with new attributes. This is manly applicable for single page applications (SPAs). And this is popular because of easiness of learning. Before you begin Angular JS you must know HTML, CSS, and JavaScript.

Basic about Angular JS

Angular JS is a JavaScript Framework. It is a library written in JavaScript. It is distributed as a JavaScript file and it can be added to a web page with a script tag.

NOTE:

Angular JS extends HTML with ng-directives

The ng-app directive defines an Angular JS application.

The ng-model directive binds the value of HTML controls input, select, text area) to application data.

The ng-bind directive binds application data to the HTML view.

example

 

 

Name:

 

 

On the above example we see, the AngularJS starts automatically when the page has loaded.

The ng-app directive tells angularJS that the <div> element is the “owner” of an AngularJS appliocation. Where ng-model directive binds the value of the input field to the application variable name. Finally the ng-bind directive binds the innerHTML of the <p> element to the application variable name.

0Shares

Add a Comment

Your email address will not be published. Required fields are marked *

Translate »