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

A function in the Route to just leave current route, whatever it is. #199

Closed
Benjy1979 opened this issue Jun 14, 2018 · 3 comments
Closed

Comments

@Benjy1979
Copy link

Hi,

It would be nice to have a function that leaves the current route and goes back up to the parent route using all the same parameters.

Like in the router, if I have afterModel(model, transition) , I may want to immediately leave the route after the route has done something in particular but it's a bit contrived to have to spell out the full route path in this.transitionTo('route1.route2.route3') etc

The code would be more reusable if you could just say:"this.leaveCurrentRoute() or just this.exitRoute() or this.leave()", blind to what route it actually is.

Thanks.

@Benjy1979 Benjy1979 changed the title A function Route() to leave current route. A function in the Route to just leave current route, whatever it is. Jun 14, 2018
@rwjblue
Copy link
Member

rwjblue commented Jun 14, 2018

Hmm, I don't fully understand how this relates to ember-try?

@Benjy1979
Copy link
Author

Oops sorry. Completely commented on the wrong page.

@rwjblue
Copy link
Member

rwjblue commented Jun 15, 2018

No problem! Closing...

@rwjblue rwjblue closed this as completed Jun 15, 2018
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

No branches or pull requests

2 participants