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

Projects
None yet
2 participants
@mixonic
Member

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

Merge pull request #3453 from mixonic/didTransitionAction
Update router.js to bc22bb4d5 For didTransition

@stefanpenner stefanpenner merged commit 45e8ed6 into emberjs:master Sep 26, 2013

1 check passed

default The Travis CI build passed
Details

@mixonic mixonic deleted the mixonic:didTransitionAction branch Sep 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment