data: [
{'Brand': 'VW', 'Speed': 100},
{'Brand': 'Audi', 'Speed': 120},
{'Brand': 'Mersedes', 'Speed': 150}
],
// OR
data: [
{'Country': 'RU', 'Total': 1020, 'Money': 'RUB'},
{'Country': 'EU', 'Total': 1240, 'Money': 'EUR'},
{'Country': 'GB', 'Total': 1550, 'Money': 'GBP'}
],
export default {
props: {
id: Number,
tmplLink: String
},
template: require(`./${this.tmplLink}.html`)
};
<script>
export default {
props: {
id: Number,
tmplLink: String
},
template: require(`./templates/default/index.html`)
};
</script>
<h1>
Lorem ipsum dolor sit amet.
{{tmplLink}}
</h1>
loader() {
return () => import(`./templates/${this.tmplLink}`);
}
loader() {
return () => import(`./templates/${this.tmplLink}`);
}
Failed to resolve async component: function () {
return __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! ./templates/default */ "./resources/js/makets/templates/default/index.vue"));
}
Reason: TypeError: Cannot read property 'call' of undefined