AngularJS Developer Question:

Download Job Interview Questions and Answers PDF

Tell me how does interpolation, e.g. “{{ someModel }}”, actually work?

AngularJS Developer Interview Question
AngularJS Developer Interview Question

Answer:

It relies on $interpolation, a service which is called by the compiler. It evaluates text and markup which may contain AngularJS expressions. For every interpolated expression, a “watch()” is set. $interpolation returns a function, which has a single argument, “context”. By calling that function and providing a scope as context, the expressions are “$parse()”d against that scope.

Download AngularJS Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain on which types of component can we create a custom directive?Tell me what should be the maximum number of concurrent “watches”? Bonus: How would you keep an eye on that number?