Overview of AngularJS

AngularJS is an open source web application framework. It is now maintained by Google. The most of the code can be eliminated by using the angular data-binding and dependency injection.

Features :
  • It provides an option to the developers to write the client side application in a clean MVC (Model View Controller)format.
  • It automatically handles the JavaScript code which is been suitable to the browser.
  • It is a powerful JavaScript based development framework to create a Rich Internet Application (RIA).
  • It is open source i.e. completely free. It is licensed under Apache License Version 2.0.

The main core features are also been described below :

Data-binding : 

It automatically synchronizes the data between the model and view components.

Scope : 

The scope is the binding part between HTML and the JavaScript i.e. view and controller. Scope is an object which contains the available properties and methods.

Controller :

Controllers are regular JavaScript Objects. These control the data of the AngularJS applications. All the angularjs applications are been controlled by controllers and ng-controller directive defines the application controller.

Services :

AngularJS has built-in services. For example $http request to make XMLHttpRequests. These all are singleton objects which are been instantiated only for once in the app.

Directives :

AngularJS lets us to extend the HTML with new attributes called Directives. These are the markers on the DOM element. AngularJS has built-in directives and also we can define our own directives.

Filters :

Filters can added to format data in AngularJS .  The filters can be added to expressions by using pipe character i.e. | and followed by filter name.

Routing :

It helps our application to become a single page application. If we want to navigate to different pages in the application and also we wanted it to be single page i.e. no page reloading then we can use ngRoute Model. The ngRoute will routes the model without reloading the page.

Dependency Injection :

AngularJS has a built-in dependency injection which will help the developer by making the applications to develop easier, understand and test.

Model View :

MVC is a design pattern for dividing an application with different parts called Model View Controller. 

Advantages :
  • It creates single page application (SPA).
  • The code is unit testable.
  • It also provides reusable components.
  • Here we write less code and get more functionality.
  • It has a data-binding capability to the HTML.
  • The main advantage is AngularJS applications can run on all major browsers and also on smart phones which include both android and IOS phone/tablets.

Disadvantages :
  • server side authentication and authorization must be required in order to keep the application secured otherwise it may not be secured.
  • If JavaScript is disabled for the application by the user then only the basic page will be seen to the user and nothing else will be seen.

Importance of AngularJS :

Few important features of the angularjs are been mentioned below in the image :


Components :

The AngularJS Framework is divided into three major directive parts. They are :

1. ng-app : This directive will link the angular application to the HTML.

2. ng-model : This directive will bind the values of angular application to the HTML view input controls.

3. ng-bind : This directive binds the angularjs application data to the HTML tags.

MVC Architecture :

It is known as Model View Controller or MVC Architecture. It is a software design pattern for developing web applications. This is made up of three parts. They are :

Model :  It is responsible for maintaining the data.

View : It displays the specific portion of the data to the user.

Controller : It controls the interaction between model and view.

MVC View :


The controllers receives all the requests from the application and then it works with model to prepare the data which is been needed by the view. The view will be the final representation response with the given data by controller.

Model will manage the application data. It updates the data based on controller information and it will respond the request from the view

View will present the data in a particular format and the controller will trigger the view to present the data and every decision is been decided by the controller.

Controller will perform the interactions on the data model objects. The control receives input, validates it and then sends a request to the model to update the data.

No comments:

Post a Comment

Overview of AngularJS

AngularJS is an open source web application framework. It is now maintained by Google . The most of the code can be eliminated by using th...