0

I'm running into some performance issues because one of my views can potentially have tons of expressions being bound and as a result tons watches firing for each.

Is there a way to output an expression once and then not watch it for changes?

I'm thinking like a filter or something along these lines:

{{ something.mytext | nowatch }}

But I'm open to anything!

I found this tutorial that describes what I'm looking for in Angular 1.3, unfortunately as of now I am stuck in an old version (1.0.7).

saricden
  • 2,084
  • 4
  • 29
  • 40
  • 2
    I think you can use [bindonce](https://github.com/Pasvaz/bindonce), but not sure whether it supports 1.0.x. – hgoebl Jan 15 '15 at 16:57
  • You could also potentially clear the `$watch`: http://stackoverflow.com/questions/14957614/angular-js-clear-watch – Davin Tryon Jan 15 '15 at 17:13
  • Awesome I'll check out bindonce. As for potentially clearing the watch @DavinTyron - do you know if one would be able to access the specific watch pertaining to a given variable in a filter applied to it? – saricden Jan 15 '15 at 17:18

0 Answers0