scrimba
Introducción a Vue
06 - Events
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

06 - Events
AboutCommentsNotes
06 - Events
Expand for more info
index.js
run
preview
console
import Vue from 'vue';

Vue.component('blog-post', {
props: ['post'],
template: `
<div class="blog-post">
<h3>{{ post.title }}</h3>
<button>
Agrandar
</button>
<div v-html="post.content"></div>
</div>
`
})

let posts = [{
title: 'Mi primer post',
content: 'Cupcake ipsum dolor sit amet fruitcake tiramisu. Apple pie cookie liquorice carrot cake. Biscuit carrot cake jelly beans soufflé marzipan icing.'
}]

new Vue({
el: '#blog-posts-events-demo',
data: {
posts,
postFontSize: 1
}
})
Console
"Download the Vue Devtools extension for a better development experience: https://github.com/vuejs/vue-devtools"
,
"You are running Vue in development mode. Make sure to turn on production mode when deploying for production. See more tips at https://vuejs.org/guide/deployment.html"
,
index.html
-5:18