I would like to setup my component structure like this:
-- model 1
---- get.vue
---- save.vie
-- model 2
---- index.vue
---- model 3
------ get.vue
------ save.vue
However, it's not allowed to setup one worded components names like:
<get></get>
Furthermore, it could collide with other components. My idea is to implement something like this:
import Create from './Create.vue'
import Get from './Get.vue'
// ...
components: {
Create: {
component: Create,
alias: 'CreateModel1'
},
Get: {
component: Get,
alias: 'GetModel1'
}
}
Why? Just write this:
import Create from './Create.vue'
import Get from './Get.vue'
// ...
components: {
CreateModel1: Create,
GetModel1: Get
}
As @sirlancelot explained, we don't need a new API for that.
Thanks a lot for the clarification!
Most helpful comment
Why? Just write this: