How to use conditions with route names #1394
-
we're moving our project from Quasar to Nuxt and nuxti18n, we faced an issue that we were using some if-conditions based on the route name like this: default-layout.vue
now this isn't possible, since nuxti18n provides a unique name for each locale so the signin routes would be like this:
so what would be the best way to handle this case? however, I tried to use I tried another approach, adding a meta to the page:
but the issue with this, it cant be accessed by $route, or inside the watchers like this:
the meta value returns null.. anyone has insights? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I just tried another way, where you can access the meta inside the middleware |
Beta Was this translation helpful? Give feedback.
-
You have the getRouteBaseName() API for getting just the base name. |
Beta Was this translation helpful? Give feedback.
You have the getRouteBaseName() API for getting just the base name.