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

How to use pathFor have id like {{pathFor route='index.resource.show'}}/{{data._id}} #1604

Open
chreounsary opened this issue Jan 23, 2019 · 2 comments

Comments

@chreounsary
Copy link

In router
Router.group('/index', 'index', function() {
this.route('/', {name: 'dashboard', sitebar: true, navbarTop: false});
this.group('/resource', 'resource', function() {
this.route('/:id/resource', {
name: 'show',
});
});
});
When i click it show http://localhost:3000/Fxc3rYgxdWmvPWyi6

i want this http://localhost:3000/index/resource/Fxc3rYgxdWmvPWyi6

@StorytellerCZ
Copy link

StorytellerCZ commented Jan 25, 2019

Not sure how groups influence the path name, but you should add the data id into the pathFor request:

{{pathFor 'show' id=data._id }}

@chreounsary
Copy link
Author

thank it work

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