I have some routes
/teams
/team/:team_id
/team/:team_id/members
Many users only have one team, so they should be able to be linked to their team route. If not, a list of teams is displayed, which link to the /team/:team_id route.
I’m currently handling this with a combination of
- a
Route.redirecthook (if they only have one team, go to theteam/:idroute) and - a list of
<LinkTo>s for each team with a dynamic route (either the default destination [/team/:id] or the parameter passed from theredirectparam).
I was thinking about adding a redirect query param, but didn’t know if that should be:
team.membersmembers/team/:team_id/members.members/members
First, whether to use / (URL convention) or . (Ember convention). Also, whether to include the current path as part of the direct (with a leading dot or slash). Plus, I can see a future need for query params on the team.members route soon (ex /team/:team_id/members?status=inactive).
This seemed to be a perfect fit for RouterService.recognize, but the missing params means I can’t build a full URL to be recognized.
Is there any recommended patterns for deep linking with unresolved params?
2 posts - 2 participants