I'm studying vue.js through reference document on Vue.js Reference Doc.
and then, i'm following up example. but, conditional part example dosen't work.
this is my code.
<template id="app-3">
<div v-if="ok">
<h1>Title</h1>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
</div>
</template>
<script src="vue.js"></script>
<script>
var app = new Vue({
el : '#app-3',
data : {
ok : true
}
});
</script>
and this code is work.
<transition id="app-3">
<template v-if="ok">
<div>
<h1>Title</h1>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
</div>
</template>
</transition>
<script src="vue.js"></script>
<script>
var app = new Vue({
el : '#app-3',
data : {
ok : true
}
});
</script>
i want to know first code why doesn't work!