I just used vue, and I instinctively thought that in templates, strings or literals can only be passed in attributes by wrapping them in double quotes.
But the answer to this question tells me that it doesn’t seem to always be the case.
I’m not sure, in the template part of Vue, what identifies which part is html and which part is js? Just like jsx.
The value of a general instruction can be a js expression. Since it is a js expression, it satisfies the syntax of ES
v-bind="js expression"
Template is a component, and a component must have only one root node. The script tag is the JS part.
Vue is composed of a component:
<template>
</template>
<script>
export defalt{
}
</script>
<style>
</style>
See the official API for details