0👍
You can register a component by using Vue.component(tagName, options)
. The 2nd parameter options
is an object with different properties like name, template etc
You could also use single-file components with the extension .vue
in combination with a build tool like Webpack. The template will be placed with a <template>
tag, styles within a <style>
tag and the options object within a <script>
tag. You can read more about single-file components here.
👤Nora
- [Vuejs]-Vue and VueRouter creating separate instances of components
- [Vuejs]-Accepting params and filtering in getter with VueX
Source:stackexchange.com