Can we set additional metadata for each routes #385
-
Hi, I want to get each page route meta data for localization, ie) page a should be default set to "en", page b should be default set to "ko". can we pass this into VueRouter arrays, and get it from our app codes? for example // vite.config.ts
},
plugins: [
VueRouter({
routesFolder: [
{ src: "src/pages/a", path: "landing/a", locale: "en" }, // <- pass locale meta
{ src: "src/pages/b"", path: "tenants/rfm/shipment/", locale: "ko"},
]
})
] // rotuer.ts
import { routes } from "vue-router/auto-routes";
routes.forEach(route => ...) |
Beta Was this translation helpful? Give feedback.
Answered by
posva
May 16, 2024
Replies: 1 comment
-
Yes, use extendRoute |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
posva
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, use extendRoute