Set $route meta data dynamically.
See original GitHub issueWhat problem does this feature solve?
For SEO / Layout purpose good to have $route.setMeta
method to update current route’s meta information because if we view an artical, I’ll fetch artical title using route param first, then We can set the page title.
please advice me.
What does the proposed API look like?
To update current route meta data
this.$route.setMeta({
title: "Example title from service."
})
Then we can have separete hook for route modifed like
router.onUpdate((route) => {
// do something here
document.title = route.meta.title;
})
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Vue Router Dynamically set Meta - Stack Overflow
I used this great idea for route permissions. I set a function to a meta.permission prop for a named route and then call...
Read more >Route Meta Fields | Vue Router
First, each route object in the routes configuration is called a route record. Route records may be nested. Therefore when a route is...
Read more >Dynamic Meta Tags in Angular - TekTutorialsHub
In this tutorial, we learn how to add Dynamic Meta Tags in Angular. First, we will define the Meta Tags in the Angular...
Read more >Dynamically Setting Meta Tags in Remix - Sabin Adams
Setting Dynamic Metadata ... To set up our metadata, we can export a meta function from our route that Remix will use to...
Read more >Simple Dynamic Pages Meta Titles On VueJS | Tony Swierz
routes : [ { path: '/', name: 'home', component: Home, meta: { title: 'Welcome' } },. In that way the tab title of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Use the meta fields: https://router.vuejs.org/guide/advanced/meta.html#route-meta-fields
Hi @fuoridallarete, Did you find a solution for this issue about making your breadcrumb title dynamic inside metafields ?