[javascript] How to watch for a route change in AngularJS?