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

Nested route snippet example not working #105

Open
JoeGrasso opened this issue Aug 16, 2017 · 6 comments
Open

Nested route snippet example not working #105

JoeGrasso opened this issue Aug 16, 2017 · 6 comments

Comments

@JoeGrasso
Copy link

How blessed difficult would it be to put a nested route in your starter kit. The snippet example you provide is too terse!

@frenzzy
Copy link
Member

frenzzy commented Aug 17, 2017

Could you explain what exactly is not working or what behavior are you expect?

One more example: https://jsfiddle.net/frenzzy/8rm2y4jg/

@mbme
Copy link

mbme commented Sep 20, 2017

@frenzzy example doesn't work with [email protected] - can't select /posts or /posts/hello-world

@frenzzy
Copy link
Member

frenzzy commented Sep 20, 2017

@mbme updated demo for v4: https://jsfiddle.net/frenzzy/8rm2y4jg/4/

@mbme
Copy link

mbme commented Sep 20, 2017

many thanks! was not clear to me that inner path now should be empty :)

@frenzzy
Copy link
Member

frenzzy commented Sep 20, 2017

If you are using trailing slashes in your paths, then router will match urls only with trailing slashes, ie

path: '/posts'   // matches both "/posts" and "/posts/"
path: '/posts/'  // matches only "/posts/"
path: '/posts'  +  path: ''       =  path: '/posts'
path: '/posts'  +  path: '/'      =  path: '/posts/'
path: '/posts'  +  path: '/:id'   =  path: '/posts/:id'
path: '/posts'  +  path: '/:id/'  =  path: '/posts/:id/'

There is an example in README.md

Any suggestions how to make it cleaner for other people?

@mbme
Copy link

mbme commented Sep 20, 2017

Docs are clear enough, that was just me - I didn't notice README updated after release

Thanks for the great library!

@frenzzy frenzzy mentioned this issue Oct 8, 2017
20 tasks
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

3 participants