Open yonihei opened 7 years ago
You can override this until fixed by doing ng-if=":auto:(!!d.fakeVariable)"
Any updates on this? It seems to occur because the bindNotifier logic is piggybacking the one time binding workflow, and the default behaviour in one-time bindings is to keep a watcher until the value is undefined https://docs.angularjs.org/guide/expression#value-stabilization-algorithm
Heres a smaller example adapted from @yonihei 's jsbin https://jsbin.com/hovurekaqo/1/edit?html,js,output you can see the watcher count go up every 1s
In short: using the plugin on an undefined object causes the number of watchers to grow for no reason constantly.
http://jsbin.com/titozudubo/edit?html,js,output (i hope it is working, but ill write here anyway the problem)
Explanation: i use a short code for finding the number watchers. i hope its is not buggy. Each time that the key "auto" has changed, it creates more watchers for no reason because d.fakeVariable is not defined.
here is the code for counting the number of watchers: