I'm trying to make the placeholder text in my input field dynamic within my Vue app. Here's what I have so far:
<template>
<div>
<input type="text" v-model="text" :placeholder="placeholder" />
</div>
</template>
export default {
data() {
return {
text: '',
placeholder: 'Some placeholder text'
}
}
}
Everything seems to be set up correctly, but for some unknown reason, the placeholder text is not showing up on the screen. When I inspect the input field, the placeholder text is visible in the DOM. What could be causing this issue?
Can anyone help me troubleshoot this problem?