[Vuejs]-How to declare component props on html <template> tag on Vue.js

0👍

You can’t declare props on the template tag like you have suggested, the only way is to declare them in JavaScript as per the documentation.

I’m not really sure why you would want to do that, or how it would improve readability. Props are a part of the component definition itself, not the template. Not all props might be rendered in the template either. Do you think that computed properties should be specified on the template tag too?

Leave a comment