Hello,
I want to build a button-conponent to handle dynamic named routes in a nuxt application. These routes have a to-property with something like:
:to="
this.localePath({
name: 'articles',
})"
:to="
localePath({
name: 'jobs-search-what',
params: {
what: 'example',
},
})
"
:to="
localePath({
name: 'jobs-query',
query: {
what: 'example',
},
})
"
What is a good data structure for this?
The only idea I have is to define a “btn_route”-json in the component to have the complete route as json.
I think this will work, but it is more developer friendly as user friendly.
But I don’t see how to handle it in a better way.
Thanks for some help!
Best regards,
Timo