universal-router
universal-router copied to clipboard
Nested route snippet example not working
How blessed difficult would it be to put a nested route in your starter kit. The snippet example you provide is too terse!
Could you explain what exactly is not working or what behavior are you expect?
One more example: https://jsfiddle.net/frenzzy/8rm2y4jg/
@frenzzy example doesn't work with [email protected]
- can't select /posts
or /posts/hello-world
@mbme updated demo for v4: https://jsfiddle.net/frenzzy/8rm2y4jg/4/
many thanks! was not clear to me that inner path
now should be empty :)
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?
Docs are clear enough, that was just me - I didn't notice README updated after release
Thanks for the great library!