-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Title tag not set using dynamic data in component #533
Comments
In true rubber duck fashion, after submitting this, I got the idea to do what I did with the description above, so even though I was using
and it worked. I then also tried another twist and made my
and used it in
and that worked as well. What that tells me is that for some reason, the value that is used for |
This is most likely due to this reactivity caveat: https://vuejs.org/v2/guide/reactivity.html#For-Objects |
Thanks for your contribution to vue-meta! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you would like this issue to remain open:
|
According to the docs,it is "easy" to set the
title
value with dynamic component data. Following those docs, I have the following setup:App.vue
Blog.vue (
/blog
)BlogPost.vue (
/blog/:slug
)The proper tag is set at
/blog/
:My Website | Blog Home
. However, at a specific blog post (e.g./blog/my-blog-post
), the title is stillBlog Home
, and not theMy Blog Post
title. And, if I inspect the object returned by themetaInfo()
function in the Vue devtools, it showstitle
with the appropriate value. However, if I settitle
as a static string, it is populated (that defeats the whole purpose of using dynamic data, but it just illustrates that it's specific to dynamic data).The text was updated successfully, but these errors were encountered: