Guest User

Untitled

a guest
Jun 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. SC.routes.currentLocationDidChange = function(){
  2. this.set('location', this.get('currentLocation'));
  3. };
  4. SC.routes.addObserver('currentLocation', SC.routes, 'currentLocationDidChange');
  5.  
  6. SC.routes.locationDidChange = function(){
  7. var location = this.get('location'),
  8. current = this.get('currentLocation');
  9. if (location !== current) {
  10. this.trigger();
  11. this.set('currentLocation', location);
  12. }
  13. }
Add Comment
Please, Sign In to add comment