Core Features of Angularjs

Mar 14 2017

Core Features of Angularjs

1. Two-way data binding: - The two-way Data Binding is an extraordinary feature ever integrated into a JavaScript framework. In two-way data binding, any changes made in the view it will reflect in the model, similarly changes made in the model it will reflect in the view. It is a two-way process.

2.MVC: - MVC or Model-View-Controller architecture. From my point of view, is to split the web application into a more manageable structure. The MVC architecture comprises of three important elements, the model, view and controller. AngularJS does not implement MVC in the traditional sense, but rather something closer to MVVM (Model-View-ViewModel).

3.Scope: - A Scope is a JavaScript object that sits inside the model, and delivers data to the view. They act as glue between controller and view.

4.Controllers: - Angularjs mainly depends on controllers to control the flow of the data in the application. A controller is defined using ng-controller directive. A controller is a javascript object it contains attributes/properties and functions. Each controller has $scope parameter which refers to the application module.

5.Directives: - Directives are markers on DOM elements (such as elements, attributes, CSS, and more). These can be used to create custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives (ngBind, ngModel...).  

6.Filters: - These select a subset of items from an array and return a new array. They can format, sort and filter the data. The filters can be used binding expression or directive. We can create customized filters also.

7.Services: - Services are javascript functions and are responsible for doing specific tasks only. Controllers, filters can call them as on requirement basis. Services are normally injected using dependency injection mechanism. AngularJS come with several built-in services for example $http to make a XMLHttpRequests. These are singleton objects which are instantiated only once in app. We can create custom services also.

8.Templates: - In Angular, templates are written with HTML that contains Angular-specific elements and attributes. These are the rendered view with information from the controller and model. These can be a single file (like index.html) or multiple views in one page using "partials".

9.Routing: - It is the concept of switching views. It helps to our application to become a single page application. We must include Angularjs routing in our module.

10.Deep linking: - Deep linking allows you to encode the state of the application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state.

11.Dependency injections: - AngularJS has a built-in dependency injection subsystem that helps the developer by making the application easier to develop, understand, and test.

12.Testing: - It is very easy to test any of components Unit test and end to end testing.

Leave a Reply