redirect redirect is hard forwarding, which means that no matter what nested routes / resources you have, it will always be redirected to profile.user . To have a different behavior, you must remove the redirect hook and provide links from the parent template or navigation to your sub-resources, for example.
{{
This will create the following HTML markup:
<a href="/user">User</a> <a href="/company">Company</a>
And in case you want to transfer the model during the transition along the route, you can in the settings of your template:
{{
In case you pass the model, you need to change the router card accordingly:
SettingsApp.Router.map(function () { .... this.resource('profile', function () { this.route('user', { path: "/user/:user_id" }), this.route('company', { path: "/company/:company_id" }) }); });
This will create the following HTML markup:
<a href="/profile/user/1">User</a> <a href="/profile/company/1">Company</a>
And finally, if you redirect to profile.user or profile.company , you will also need templates for these routes.
Hope this helps.
source share