learnin-some-vue/index.html
2018-04-13 22:54:45 -04:00

25 lines
601 B
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script src="vue.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id='app'>
<button type="button" name="button" @click="show = !show">
Switch
</button>
<p v-if="show">You can see me</p>
<p v-else>Now you see me</p>
<template v-if="show">
<h1>Heading</h1>
<p>Inside a template</p>
</template>
<p v-show="show">Do you also see me?</p>
</div>
<script src="app.js" charset="utf-8"></script>
</body>
</html>