O'Reilly logo

Mastering Web Application Development with AngularJS by Pawel Kozlowski, Peter Bacon Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying results of expression evaluation

AngularJS offers various ways of rendering data. The net effect is always the same model content is displayed to users, but there are also subtleties worth noting.

The interpolation directive

The interpolation directive is the most fundamental directive that deals with model data display. It accepts expressions delimited by a pair of curly braces:

<span>{{expression}}</span>

This directive will simply evaluate the expression and render its result on a screen.

The delimiter used by AngularJS is configurable; changing defaults might be needed if you plan to mix AngularJS with other language template on the server-side. Re-configuration is really simple and boils down to setting properties on the $interpolateProvider ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required