how to create toggle using boolean in vue code example
Example: vue toggle boolean on click
// In HTML tag
@click="toggle = !toggle"
// In Vue script
export default {
data() {
return {
toggle: false
}
}
}
// In HTML tag
@click="toggle = !toggle"
// In Vue script
export default {
data() {
return {
toggle: false
}
}
}