If the :name="name"
syntax is used, the value of the name attribute will be the unique data it receives from the props.
However, if I use name="name"
without the preceding :
, then it will simply be "name"
.
What role does the :
play in the name attribute?
Sample code snippet:
<template>
<div class="form-group">
<div
class="form-control"
:name="name">
</div>
</div>
</template>
<script>
export default {
name: 'base-date',
props: ['id', 'name', 'placeholder', 'type', 'value']
</script>