To do this we have to inject
$location into our angular control. See the Angular Guide about $location. Then we have to observe both the $scope.term (which is bound to the input value) and $location.search().
<input type="text" ng-model="term"/>
Nikita Tovstoles (@NikitaTovstoles) - Nov 6, 2013
how does the above not cause a circular loop (since two $watch invocations are ‘watching’ respective outputs)? thanks!
Ohar - Feb 3, 2016
Not triggering at $location.search(NAME, VAL);