Google

Sep 16, 2013

AngularJS big picture : Overview

This is for the AngularJS starters. You will see handy diagrams and third-party links to get started with Angular JS, which is getting so much attention.

Q. Can you give a big picture of AngularJS highlighting its key components?
A. A good diagram is worth 1000 words.



A good link to get an overview of AngularJS. Once you get a high level understanding, go to YouTube and search for excellent AngularJS video tutorials to get started.


Q. What is a scope in AngularJS?
A. scope is an object that refers to the application model. It is the glue between application controller and the view. Both the controllers and directives have reference to the scope, but not with each other. It is an execution context for expressions and arranged in hierarchical structure. Scopes can watch expressions and propagate events.

Q. Can you explain the concept of scope hierachy? How many scopes can an application have?
A. Each Angular application has exactly one root scope, but may have several child scopes. The application can have multiple scopes, because child controllers and some directives create new child scopes. When new scopes are created, they are added as children of their parent scope. This creates a hierarchical structure similar to the DOM where they're attached.

When Angular evaluates a bound variable like say {{firstName}}, it first looks at the scope associated with the given element for the firstName property. If no such property is found, it searches the parent scope and so on until the root scope is reached. In JavaScript this behaviour is known as prototypical inheritance, and child scopes prototypically inherit from their parents. The reverse is not true. I.e. the parent can't see it's children's bound properties.

AnagularJS Interview Questions and Answers



If you are just starting with angularjs

Q. What do you understand by the term two way data binding in AngularJS?
A. The AngularJS ref and Overview

Q. Why is AngularJS popular?
A. Why does AngularJS rock?

The above references should get you started and prepare for key interview questions on AngularJS. Stay tuned for more AngularJS blog posts. Ther are other MVW frameworks like Backbone. Ember, etc.

Labels:

1 Comments:

Blogger Jharaphula Dir said...

Look at some more interview question of AngularJS http://jharaphula.com/interview-questions-for-angularjs

10:08 PM, June 25, 2014  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home