-
-
Notifications
You must be signed in to change notification settings - Fork 406
Closed
Description
Right now, refresh only exists on the route.
It'd be fantastic if we had a central place to call refresh.
Update 1
@service router;
// ...
// refreshes current route
this.router.refresh()
// refreshes the application and all child routes
this.router.refresh('application')
// maybe typed this way
refresh(routeName?: string): Promise<void>;Original Text
Maybe this is something that exists on each RouteInfo that makes of the list of route infos representing the current route?
Given:
this.route('posts', function() {
this.route('show', { path: ':id' });
})And I want to refresh just the show route, maybe I'd do:
@service router;
// ...
this.router.currentRoute.refresh();And give that the route tree is represented as a linked list:
<RouteInfo#application>
⇩
<RouteInfo#posts>
⇩
<RouteInfo#show> <- currentRoute
maybe I want to refresh just the posts route?
this.router.currentRoute.parent.refresh();Thoughts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels