AngularJs Overview and Features
This article is about features and Advantages of AngularJs
Features
-
AngularJs is cross-browser compliant. It handles JavaScript automatically as per browser.
-
AngularJs licensed under the Apache License version 2.0, It’s completely free and open source.
-
In AngularJs we can write client side application in a MVC (Model View Controller) way.
-
We can create very attractive and rich internet application (RIA) using AngulrJs.
Core and Important Features of AngularJS
-
Directives: AngularJS directives helps us to extend HTML tags, with the help of directives we can create custom HTML tags or custom widgets. Some built-in directives in AngularJS are ng-app, ng-init, ng-model, etc.
-
Expressions: Expressions is a code that is mainly placed inside double braces.
Some examples of valid expressions in AngularJS:- {{1+5}}
- {{products[index]}}
- {{x+y}}
-
Module: We can say module works as a container for different parts of our application. AngularJS controllers must belong to a module.
-
Data-binding: Data-binding is the automatic synchronization of data between model and view components.
-
Controller: Controller is used to control AngularJS application, ng-controller directive is used to attach the controller to the DOM.
-
Scope: Scope is link between HTML and the JavaScript or we can say link between view and controller. It is an object refers to the model.
-
Services: There are several built-in services in AngularJS, for example $http to make a XMLHttpRequests, We can also create our own services for application.
-
Filters: Filters are using to formats the value of expression for display to the user. Currency, date, lowercase, number are some of the examples of AngularJS filter.
Syntax:
{{ expression | filter }}Example:
The name is {{ Name | uppercase }}
-
Templates: AngularJS templates are written with HTML that contains Angular-specific elements and attributes, it rendered view with information from the controller and model.
-
Deep Linking: It allows us to encode the state of application in the URL so that it can be bookmarked.
Advantages of AngularJS
-
AngularJS is very useful to create Single Page Application in a very clean and maintainable way.
-
Its cross-browser compliant.
-
It provides us the reusable components.
-
It uses dependency injection and make use of separation of concerns.
-
It provides data binding capability to HTML elements, thus it gives user a rich and responsive experience.
-
MVC Architecture is used AngularJS, Module works as a container for different parts of our application, views are pure html pages, and controllers written in JavaScript do the business processing.