{"action":"opened","issue":{"url":"https://api.github.com/repos/ktquez/vue-head/issues/13","repository_url":"https://api.github.com/repos/ktquez/vue-head","labels_url":"https://api.github.com/repos/ktquez/vue-head/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ktquez/vue-head/issues/13/comments","events_url":"https://api.github.com/repos/ktquez/vue-head/issues/13/events","html_url":"https://github.com/ktquez/vue-head/issues/13","id":170576807,"number":13,"title":"Values not reactive?!","user":{"login":"CinKon","id":3854991,"avatar_url":"https://avatars.githubusercontent.com/u/3854991?v=3","gravatar_id":"","url":"https://api.github.com/users/CinKon","html_url":"https://github.com/CinKon","followers_url":"https://api.github.com/users/CinKon/followers","following_url":"https://api.github.com/users/CinKon/following{/other_user}","gists_url":"https://api.github.com/users/CinKon/gists{/gist_id}","starred_url":"https://api.github.com/users/CinKon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CinKon/subscriptions","organizations_url":"https://api.github.com/users/CinKon/orgs","repos_url":"https://api.github.com/users/CinKon/repos","events_url":"https://api.github.com/users/CinKon/events{/privacy}","received_events_url":"https://api.github.com/users/CinKon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-11T06:13:04Z","updated_at":"2016-08-11T06:13:04Z","closed_at":null,"body":"I want to update the title and meta-tags after the page-content is loaded via REST-API, so the final values don't exist when the component is created.\r\n\r\nUnfortunately, the meta-tags and title won't react to changes in the data-variables:\r\n\r\n```vue\r\n<template lang=\"pug\">\r\n  .sections\r\n</template>\r\n\r\n<script>\r\nimport { fetchData }                  from '../../../js/mixins'\r\n\r\nexport default {\r\n  name: 'HomeTemplate',\r\n  data () {\r\n    return {\r\n      [...],\r\n      getcontent: {\r\n        contents: {\r\n          myTitle: ''\r\n        }\r\n      }\r\n      meta: {\r\n        myTitle: ''\r\n      }\r\n    }\r\n  },\r\n  [...],\r\n  head: {\r\n    title: function () {\r\n      return {\r\n        inner: this.meta.myTitle\r\n      }\r\n    },\r\n    meta: function () {\r\n      return [\r\n        { name: 'description', content: this.meta.myTitle, id: 'desc' }\r\n      ]\r\n    }\r\n  },\r\n  methods: {\r\n    [...],\r\n    setMetaData () {\r\n      if (typeof this.getcontent !== 'undefined') {\r\n        if (this.getcontent.contents.headline !== '') {\r\n          this.meta.myTitle = this.getcontent.contents.headline\r\n        }\r\n      }\r\n    },\r\n    fetchMyData () {\r\n      const _this = this\r\n      let contentPath = ''\r\n      let teaserPath  = ''\r\n\r\n      // Set API-Paths\r\n      if (process.env.NODE_ENV === 'development') {\r\n        contentPath   = '../../static/testData/contents/home.json'\r\n        teaserPath    = '../../static/testData/contents/home_teaser.json'\r\n      } else {\r\n        contentPath   = '/?_format=json'\r\n        teaserPath    = '/rest_extended/front_content?_format=json'\r\n      }\r\n\r\n      // Fetch Data\r\n      fetchData(_this, contentPath, 'getcontent', function () {\r\n        fetchData(_this, teaserPath, 'teasers', function () {\r\n          _this.setMetaData()\r\n        })\r\n      })\r\n    }\r\n  }\r\n}\r\n</script>\r\n```\r\n\r\n`this.meta.myTitle` changes correctly in the vue-console, but nothing happens in the `<title>` or `<meta name=\"description\">`"}}
{"actor":{"display_login":"CinKon"}}