What is AngularJS ?
AngularJS is the most popular and dominant JavaScript framework for professional web development.
It is well suited for small, large and any sized web app and web application. AngularJS can be added in an HTML page using the <script> tag as below
<script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js”></script>
Sample HTML page with AngularJS
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<html ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> </head> <body> <div> <label>Name:</label> <input type="text" ng-model="name" placeholder="Enter your name here"> <hr> <h1>Hello {{name}} , Welcome to j2eereference.com!</h1> </div> </body> </html> |
output
Why to use AngularJS?
There are following reasons,why to use AngularJS as a web development framework:
1. It follows MVC pattern which helps to organize your web apps or web application properly.
2. It extends HTML by attaching directives to your HTML markup with new attributes or tags and expressions in order to define very powerful templates.
3. It also allows you to create your own directives.
4.. AngularJS supports two-way data binding , Any change in model will update the view and vice versa without any DOM manipulation.
5. It encapsulates the behavior of your application in controllers which are instantiated with the help of dependency injection.
6. It provides $http service to communicate with REST service.
7. AngularJS mark-up lives in the DOM.
8. AngularJS uses plain old JavaScript objects (POJO).
9. AngularJS can be easily integrate with any other java script library.
Leave a Reply