showing results for - "update head tag metadata vue"
Tomas
06 Aug 2016
1created() {
2  fetch('test.json')
3    .then(resp => resp.json())
4    .then(items => {
5      this.items = items;
6      const descEl = document.querySelector('head meta[name="description"]');
7      const titleEl = document.querySelector('head title');
8
9      descEl.setAttribute('content', items[0]['meta-desc']);
10      titleEl.textContent = items[0]['meta-title'];
11    })
12}
13