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

Add route params to route history #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewhavens
Copy link

I needed this feature for a project that I am working on. I'm not sure if this implementation is in-line with your goals for this add-on, so I will leave this for you to review. Let me know what you think. The goal of this was to provide the route params as part of the history. Now I can do something like this:

var previousRoute = this.get('routeHistory.previous');
var routeName = previousRoute[0];
var routeParams = previousRoute[1];
if (routeName == 'post') {
  this.transitionToRoute('post', routeParams.post_id);
}

@lougreenwood
Copy link

Any news on this? this would be very useful for me too

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