I have a question about how to avoid watchers when you have readonly input textbox in AngularJS.
I have created plunker for it : plunker link : OneWay Binding using ng-value
This shows that even when I am using ng-value for readonly input text, still a watcher has been added for it.
I simple want to avoid watchers when there are readonly controls, I am asking this because in my enterprise application, even for readonly page I have more-than 200 readonly controls and watcher count there is coming around 1100 which is slowing down my Angular Application.
Found a way to do it with one way bindings:
Try pressing "Get Watchers" and see that the watcher count is initially 3. Then write something or copy/paste into the first input and press "Get Watchers" again. Voila the watcher count decreased to 2 because the one time binding on the second input got evaluated when it got a value and it then removed its watcher.