Reputation: 82
I have set the "name" property in Oneway.vue but I can't use the component and I got this error: did you register the component correctly? For recursive components, make sure to provide the "name" option
import Oneway from '../Flight/Oneway';
export default {
name:'FlightResult',
components:{
Oneway
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<template>
<div>
<one-way></one-way>
</div>
</template>
Upvotes: 0
Views: 81
Reputation: 4584
For alternative answer , you can define component name as below
import Oneway from '../Flight/Oneway';
export default {
name:'FlightResult',
components:{
'one-way': Oneway
}
}
Upvotes: 1