Angular.js 1.3 One-time binding in ng-bind

Boas Enkler picture Boas Enkler · Nov 4, 2014 · Viewed 10.5k times · Source

In Angular.js 1.3 I can do a one time binding with:

{{::name}}

But how may I use this in ng-bind?

ng-bind had some performance improvements in comparison to the {{ syntax.

Is it supported?

Answer

seldary picture seldary · Nov 4, 2014

Yes. This works:

<span ng-bind="::name"></span>