Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update router.js to bc22bb4d5 For didTransition #3453

Merged
merged 1 commit into from
Sep 26, 2013

Conversation

mixonic
Copy link
Member

@mixonic mixonic commented Sep 20, 2013

Update the router.js for tildeio/router.js#52

Allows:

App.ApplicationRoute = Ember.Route.extend({
  actions: {
    didTransition: function(){
      var router = this.router;
      Ember.run.once(function(){
        // Track this pageview with Google analytics
        _gaq.push(['_trackPageview', router.get('url')]);
      });
    }
  }
});

App.LeafyRoute = Ember.Route.extend({
  actions: {
    didTransition: function(){
      // Just to give an idea, I have not done this.
      this.controllerFor('breadcrumbs').send('addCrumb', 'leafy');
      return true; // Bubble to track analytics
    }
  }
});

stefanpenner added a commit that referenced this pull request Sep 26, 2013
Update router.js to bc22bb4d5 For didTransition
@stefanpenner stefanpenner merged commit 45e8ed6 into emberjs:master Sep 26, 2013
@mixonic mixonic deleted the didTransitionAction branch September 26, 2013 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants