AngularJS

  Home  Client Side Scripting  AngularJS


“Sizzle Selector Engine job test questions and answers guide. The one who provides the best answers with a perfect presentation is the one who wins the job hunting race. Learn Sizzle JQuery Engine and get preparation for the new job”



57 AngularJS Questions And Answers

21⟩ What are the advantages of using Angular.js framework?

Advantages of using Angular.js as framework are:

► Supports two way data-binding

► Supports MVC pattern

► Support static template and angular template

► Can add custom directive

► Supports REST full services

► Supports form validations

► Support both client and server communication

► Support dependency injection

► Applying Animations

► Event Handlers

 242 views

22⟩ What is dependency injection in AngularJS?

DI or Dependency Injection is a software design pattern that deals with how code gets hold of its dependencies. In order to retrieve elements of the application which is required to be configured when module gets loaded , the operation "config" uses dependency injection.

 249 views

23⟩ What are the characteristics of "Scope"?

► To observer model mutations scopes provide APIs ($watch).

► To propagate any model changes through the system into the view from outside of the Angular realm.

► A scope inherits properties from its parent scope, while providing access to shared model properties, scopes can be nested to isolate application components.

► Scope provides context against which expressions are evaluated.

 246 views

26⟩ What are the concept of scope hierarchy? Tell me how many scope can an application have?

Each angular application consist of one root scope but may have several child scopes. As child controllers and some directives create new child scopes, application can have multiple scopes. When new scopes are formed or created they are added as a children of their parent scope. Similar to DOM, they also creates a hierarchical structure.

 253 views

33⟩ What is factory method in angular.js?

For creating the directive, factory method is used. It is invoked only once, when compiler matches the directive for the first time. By using $injector.invoke the factory method is invoked.

 301 views

35⟩ What is linking function?

Link combines the directives with a scope and produce a live view. For registering DOM listeners as well as updating the DOM, link function is responsible. After the template is cloned it is executed.

 244 views

36⟩ What is string interpolation in angular.js?

In angular.js the compiler during the compilation process matches text and attributes using interpolate service to see if they contains embedded expressions. As part of normal digest cycle these expressions are updated and registered as watches.

 297 views