App.vue
file: code/App.vue 18: var App = Vue.extend({ 19: name: 'Senph', 20: components: { 21: ShowTopic 22: }, 23: data: function () { return { 24: topicUrl: '', 25: }}, 26: beforeCreate() { 27: this.axios.defaults.headers.common['Accept'] = 'application/json'; 28: }, 29: beforeMount() { 30: this.topicUrl = this.$el.dataset.topicUrl; 31: }, 32: });
access a 'data-' attribute
<div id="senph" data-topic-url="..."></div>