vue js on checkbox show div

Solutions on MaxInterview for vue js on checkbox show div by the best coders in the world

showing results for - "vue js on checkbox show div"
Luca
28 Apr 2018
1var app = new Vue({
2        el: '#selector',
3        data: {
4            checked: false
5        }
6});
7
8
9<script src="https://unpkg.com/vue/dist/vue.js"></script>
10<body>
11   <div id="selector">
12    <div class="checkbox">
13        <label><input type="checkbox" v-model="checked">Options</label>
14    </div>
15    <div class="container" id="app-container" v-if="checked">
16        <p>Text is visible</p>
17    </div>       
18   </div>
19</body>