vue js app component

Solutions on MaxInterview for vue js app component by the best coders in the world

showing results for - "vue js app component"
Fabio
26 Jul 2019
1<template>
2  <your-component></your-component>
3</template>
4
5<script>
6  import YourComponent from '../components/YourComponent.vue'
7  
8  export default {
9	components: {
10      YourComponent // <=> YourComponent: 'YourComponent'
11    }	
12  };
13</script>
14
15<!-- OR -->
16
17<script>
18  export default {
19	components: {
20      YourComponent: () => import('your/component/path')
21    }
22  }
23</script>
Camelia
31 Feb 2019
1// main.js
2import { createApp } from 'vue'
3import App from './App.vue'
4import 'YourComponent' from 'YourFileOrLibrary';
5
6
7const app = createApp(App);
8app.component('yourComponent', YourFileOrLibrary);
9
10// ...
similar questions
queries leading to this page
vue js app component