-
-
Save uno-de-piera/61e8fc4d9576996bcdef86c6fc0fcdd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang='pug'> | |
div.container | |
div Vuejs con Pug en {{ name }} | |
hello-world(msg="Hola Mundo", :author="name", @hello="sayHello") | |
</template> | |
<script> | |
import HelloWorld from '../components/HelloWorld' | |
export default { | |
name: 'home', | |
components: { | |
HelloWorld | |
}, | |
data () { | |
return { | |
name: 'Cursosdesarrolloweb' | |
} | |
}, | |
methods: { | |
sayHello () { | |
alert('Helloooooo!') | |
} | |
} | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang='pug'> | |
.div.hello | |
h1(@click="$emit('hello')") {{ msg }} - {{ author }} | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'HelloWorld', | |
props: { | |
msg: String, | |
author: String | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment