Features of AngularJS – Interview Questions

Why AngularJS? This is simple question looks like but many of us doesn’t know the answer. This is the important AngularJS Interview Question that everyone expect on their walkins to AngularJS interview and mostly freshers. This post also gives the answer for features for AngularJS.

There are many obvious reasons for switching over to Angular and some of them are:

  • Two-way Data binding
  • Templates
  • Extends HTML
  • Dependency Injection
  • Directives
  • Localization
  • Testable
  • Form Validation
  • Deep Linking
  • REST
  • Form Browser Support

 

Two-Way Data Binding

Your model is where you read or update anything in your application. AngularJS two-way data-binding handles the synchronization between the DOM and the model vice versa.

 

Templates

In AngularJS, a template is just plain old HTML. The HTML templates are parsed by the browser into DOM. The input to AngularJS is browser DOM and not an HTML string like innerHTML.

 

Extends HTML

With Angular, you can operate your HTML like XML, giving you endless possibilities for tags and attributes. Angular accomplishes this via it’s HTML compiler and the use of directives to trigger behaviors based on the newly-created syntax you write.

At the same time you may want to know Things about $broadcast.

 

Dependency Injection

Dependency Injection (DI) allows you to ask for your dependencies, rather than having to go look for them or make them yourself. To gain access to core AngularJS services, it is simply a matter of adding that service as parameter. AngularJS will detect that you need that service and provide an instance for you.

 

Directives

  1. Directives can be used to create custom HTML tags that serve as new, custom widgets
  2. They can also be used to enhance elements with behavior and manipulate DOM attributes in interesting ways
  3. We use directives to create reusable components. A component allows you to hide complex DOM Structure, CSS and behavior

 

Localization

An important part of serious apps is localization. Angular’s locale aware filters and directives give you building blocks to make your application available in all locales.

 

Testable

The AngularJS team have designed AngularJS with testability in mind, so that it makes testing your AngularJS applications as easy as possible. AngularJS is written entirely from the ground up to be testable. It even comes with an end-to-end and unit test runner setup.

 

Deep Linking

AngularJS provides the features of deep links providing users access to specific content they need.

 

Form Validation

Client-side form validation is an important part of great user experience. AngularJS lets you declare the validation rules of the form without to write Javascript code.

 

REST

RESTful actions are quickly becoming the standard for communicating from server to client. You can quickly talk to the server and get the data you need to interact with your webpages. AngularJS turns this into a simple Javascript object, as models, following the MVVM (Model View View-Model) pattern.

 

Form Browser Support

According to the official website of AngularJS (angularjs.org): They have run their “Extensive test suite against the following browsers: Safari, Chrome, Firefox, Opera, IE8, IE9 and mobile browsers (Android, Chrome mobile, iOS Safari).” There are browser extensions available for Chrome (AngularJS Batarang) for debugging.


 


Leave a Reply

Your email address will not be published.