false true click vue js html 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
}
}
}