Home

Issue: 912

Dynamic route /users/:id/billing

[issue link]

I’ve seen the dynamic nested route example (eg. pages/_category/_subCategory/index.vue), but I haven’t seen one that represents one similar to the example in the issue title. I’ve tried users-id-billing, but that doesn’t seem to work ('regex' of undefined error). I’m not sure I even know what the folder structure would look like. The docs seem to be lacking an example like this (static-dynamic, static-dynamic-static).

You’d need to be able to load the user’s index component (so it’s not a dynamic folder), and also load the billing component when navigated to.

Also, since in this case billing uses the parent user’s data, is there a way to load the data at in the user’s component, and pass that data down to the billing component?

Is this beyond the scope of server-side routing (basically, SSR stops at /users/:id/ and the browser handles /billing)? If so, how would one differentiate between routes handled by the server, and ones handled by browser? Lastly, if there are browser-only routes, how do we prevent a 404?

Thanks!

This question is available on Nuxt.js community (#c779)