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

Users who have contributed to this file

40 lines (34 sloc) 821 Bytes
<!DOCTYPE html>
<html>
<head>
<title>Vue.js! 🚀</title>
</head>
<body>
<!-- HTML -->
<div id="app">
<ul>
<li v-for="person in people">
<label>
<input v-bind:value="person" v-model="selectedPeople" type="checkbox">
{{ person }}
</label>
</li>
</ul>
<!-- Add new user input and button -->
<input type="text" v-model="newPerson">
<button type="button" v-on:click="people.push(newPerson)"> Add Person </button>
</div>
<!-- JavaScript -->
<script src="vue.js"></script>
<script>
let vm = new Vue({
el: "#app",
data: {
people: ['Mike', 'Kat', 'Dat', 'Todd'],
selectedPeople: [],
newPerson: ""
}
})
</script>
</body>
</html>