I'm trying to implement 1-way binding. What I want is that changing dropdown should affect the text in <p>
and the text. Change tag should effect only text within <p>
. But when I change the dropdown value, I lost the value within the <p>
as well as within the tags
<span class="wt-select">
<select id="student_skill" v-model="selected">
<option v-for="(stored_skill, index) in stored_skills" :key="index.id" :value="stored_skill.id">{{stored_skill}} hours</option>
</select>
<p>{{ selected }}</p>
<input :value="selected" type="text" class="form-control" id="date_time">
</span>
How can I achieve this? I tried the following link, but still unable to achieve this one-way binding: