Permalink
Find file Copy path
9eb53f6 Jan 13, 2020
bunny Yay
0 contributors

Users who have contributed to this file

41 lines (32 sloc) 749 Bytes
<!DOCTYPE html>
<html>
<head>
<title>Vue.js! 🚀</title>
</head>
<body>
<!-- HTML -->
<div id="app">
<!-- Create list of checkboxes dynamically -->
<label v-for="person in people"> {{ person }}
<input
v-bind:value="person"
v-model="selectedPeople"
type="checkbox">
</label>
</div>
<!-- JavaScript -->
<script src="vue.js"></script>
<script>
// Create a new Vue instance
let vm = new Vue({
el: "#app",
data: {
// List of checkbox items
people: ['Mike', 'Kat', 'Dat', 'Todd'],
// List of selected checkbox items
selectedPeople: []
}
})
</script>
</body>
</html>