JS Bin
✓ Published0🌍 Public
Aali-bugdayci
Last edited Dec 18, 2014
Created on Dec 18, 2014
This example demonstrates how AngularJS 1.3’s one-time binding syntax (`::`) reduces the number of active watchers in a scope. It shows a live counter of watchers that updates every 100 milliseconds via `$interval`, while two sets of five value spans are conditionally rendered with `ng-if`. Clicking “Assign values” populates the values, and clicking “Stop Watching” switches the display to one-time bindings, causing the watcher count to drop. The code uses AngularJS’s `$scope`, `ng-click`, and `ng-init` to manage state and manually traverses the DOM to count watchers.
AI-generated description