In vue2 js, I want to use a checkbox with a v-model.
<input type="checkbox" value="test" :checked="selected"/>
I want the value of the checkbox to be test, however I want the 2 way binding with the prop called selected which is a boolean. However the above only does 1 way binding. How can I fix this?
<input type="checkbox" name="vehicle3" value="Boat" checked>andv-modelseems to alter thevalueattribute. So how would that work when thecheckedattribute needs to be 2-way bind?