-
-
Save chrisvfritz/e2b6a6110e0829d78fa4aedf7cf6b235 to your computer and use it in GitHub Desktop.
<template> | |
<p>{{ greeting }} World!</p> | |
</template> | |
<script> | |
module.exports = { | |
data: function () { | |
return { | |
greeting: 'Hello' | |
} | |
} | |
} | |
</script> | |
<style scoped> | |
p { | |
font-size: 2em; | |
text-align: center; | |
} | |
</style> |
π
That's silly question, but I suppose that screenshot on Vue's website is from you, could you tell me what syntax template do you use?
Can you give an example of how to use this file in an app? All of the other documentation in the guide on vuejs.org shows that you create components like:
var ComponentA = { /* ... / }
or
Vue.component('MyComponentName', { / ... */ })
then you can reference them by name, but in this file i don't see a component name or does it just come from the file name?
Where is the component tag name defined? is it taken from the file name, so to use the above I would write <hello></hello>
?
Where is the component tag name defined? is it taken from the file name, so to use the above I would write
<hello></hello>
?
I'm going to take a wild guess and say its whatever you export it as. So if its exported as default then it's whatever you name it on the import.
goods
Hello vue!
θΏγγγγ
good star
six six six
Thanks