JS Bin
✓ Published0🌍 Public
Aali-bugdayci
Last edited Dec 18, 2014
Created on Dec 18, 2014
This example demonstrates how AngularJS one-time bindings (`::`) reduce the number of active watchers in a scope. It shows a live counter of watchers that updates every 100 milliseconds via `$interval`, while the user can toggle watching and assign values to see the effect on watcher count. The code uses AngularJS 1.3.2, with a custom `countWatchers` function that traverses the DOM with `angular.element` and `element.data()` to inspect `$$watchers` on each scope. The display updates dynamically, revealing that one-time bindings prevent additional watchers from being created.
AI-generated description