I tweaked this answer a bit and came up with this fiddle. Filter defined as: var myApp = angular.module('myApp', []); myApp.filter('range', ... ... <看更多>
$watch sets a callback to be called after variable changes (binding variable=>DOM). note: this is example is a demonstration, not the actual angular code. < ... ... <看更多>