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

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