NuxtN
Nuxt14mo ago
grip

Dynamically add routes in runtime based on pinia store value

I want to dynamically add some protected admin routes on my app only for the admin user type. the admin user type is evaluated server side in a plugin. can i use router.addRoutes there?

for my routes i dont use the file system routing but the router.options.ts method instead
Was this page helpful?