0👍
In the end I used plain js to get the checked status of the checkbox at page load but would like to have more “vuesc” way to do that.
Vue.component('save-numbers', {
data() {
return {
toggleNotes: document.getElementById('saveNumbers').checked,
}
},
methods: {
},
});
- [Vuejs]-Using bulma accordions, out of two accordions , how to display the later accordion , on click of a button inside the former accordion?
- [Vuejs]-How can I force user to choose at least one option to go to next page Vue JS
0👍
data() {
return {
title: 'Check me',
toggle: false,
isChecked: true,
}
},
return a boolean
<label class="inline-block text-gray-500 font-bold mb-4">
<input class="mr-2 leading-tight" type="checkbox" name="saveNumbers" id="saveNumbers" v-model="toggle" {{ old('saveNumbers') ? 'checked' : '' }}/>
checked="isChecked" </label>
Source:stackexchange.com