Last active
April 10, 2019 06:37
-
-
Save njwest/837a3c813dc0cbd370571c6de901e907 to your computer and use it in GitHub Desktop.
Passing data through as prop
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> | |
<div id="app"> | |
<img alt="Vue logo" src="./assets/logo.png"> | |
<HelloWorld :msg="message"/> | |
</div> | |
</template> | |
<script> | |
import HelloWorld from './components/HelloWorld.vue' | |
export default { | |
name: 'app', | |
components: { | |
HelloWorld | |
}, | |
data(){ | |
return { | |
message: 'Hello World!' | |
} | |
} | |
} | |
</script> | |
// styles omitted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment