I started learning Vue for real now and 'm following videos from Jeffrey Way Vue 2....and in this video https://laracasts.com/series/learn-vue-2-step-by-step/episodes/9 he has 2 messages in html and on my side it doesn't work.... this is my code...just copy paste it in .html document and it works...so if someone can explain it to me why does my second message doesn't display??
<!-- begin snippet -->
<!DOCTYPE html>
<html>
<head>
<title>Index</title>
<!-- <link rel="stylesheet" type="text/css" href="/var/www/html/vanilla/Vue/bulma.min.css"> -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.0/css/bulma.min.css">
</head>
<body>
<div id="root" class="container">
<message title="Hello World" body="Lorem ipsum dolor sit amet"><message>
<message title="Hello Latin" body="Repetitio est mater studiorum"><message>
</div>
<!-- <script src="/var/www/html/vanilla/Vue/vue.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.2/vue.min.js"></script>
<script>
Vue.component('message', {
props: ['title', 'body'],
data() {
return {
isVisible: true
}
},
template: `
<article class="message" v-show="isVisible">
<div class="message-header">
{{ title }}
<button class="button" @click="hideModal">X</button>
</div>
<div class="message-body">
{{ body }}
</div>
</article>
`,
methods: {
hideModal() {
this.isVisible = false;
}
}
});
new Vue({
el: '#root'
});
</script>
</body>
</html>
<!-- end snippet -->
this one doesn't get shown
<message title="Hello Latin" body="Repetitio est mater studiorum"><message>