Monday, February 15, 2016

What is Interpolation in AngularJS

Interpolation is such a process when AngularJS fetches a calculated string into the text between HTML element tag and within attribute assignments.

Let's see example of interpolation:

    <img src = "{{myImageUrl}}" >

In this example {{myImageUrl}} first is been evaluated by AngularJS and only then it converts it to a string. And remember that template expression cannot refer to anything in the global namespace.

No comments:

Post a Comment