One-way data bindings in AngularJS 1.3

11 December 2014   1 comment   AngularJS, Javascript

http://plnkr.co/edit/YHrf1fpJmuusqOoLE59A?p=info

Mind That Age!

This blog post is 5 years old! Most likely, its content is outdated. Especially if it's technical.

You might have heard that AngularJS 1.3 has "one-time bindings" which is that you can print the value of a scope variable with {{ ::somevar }} and that this is really good for performance because it means that once rendered it doesn't add to the list of things that the angular app needs to keep worrying about. I.e. it's one less thing to watch.

But what's a good use case of this? This is a good example.

Because ng-if="true" will cause the DOM element to be re-created it will go back to the scope variable and re-evaluate it.

Comments

Srinivas Kasiriveni

nice blog

Your email will never ever be published


Related posts

Previous:
vipsthumbnail 08 December 2014
Next:
Fastest way to take screencaps out of videos 19 December 2014