I'm using Vue. Instead of declaring my templates on my javascript, I prefer to do the html way for readability and code detection on sublime, so I'm using this:
<template id="test-component">
<h1>Testing</h1>
</template>
Vue.component('test', {
template: '#test-component'
});
<test></test>
Works well.. but I want to pass some data to the template, like this:
<template id="test-component">
<h1>{{text}}</h1>
</template>
Vue.component('test', {
template: '#test-component',
props: ['text']
});
<test text="asd"></test>
Also works well, but.. I want to declare the props on the template tag for easier readability on my project, not on the javascript component function, is there any way I could do that? Something like this (doesn't work):
<template id="test-component" props="['text]">
<h1>{{text}}</h1>
</template>