0

I am having difficulty in getting the component html shown in browser I have a component called fullName which contains

<template>
 <div>
   <h3>
    {{data.firstName}} {{data.lastName}}
   </h3>
 </div>
</template>

<script>
export default{
 name: 'fullName',
 props:{
  data:Object
 }
}
</script>

and i pass firstName and lastName as props but when I inspect in chrome the component shows up like this

 <fullName data=[object object]></fullName>

instead of

 <div>
   <h3>Abhishek Singh</h3>
 </div>

where I pass Abhishek and Singh as props

can someone help me to debug this or let me know why it is happening

3
  • It seems you didn't register fullName component inside the parent component - for more information: Component Registration Commented Jun 18, 2019 at 10:25
  • @Muhammadvakili I register the component if i have not registered it there should be a console error Commented Jun 18, 2019 at 11:24
  • Have you fixed the problem? If not can you share how this component is used so we can have a better look Commented Jun 23, 2019 at 8:47

1 Answer 1

2

Did you register the fullName component in its parent component properly?

Sign up to request clarification or add additional context in comments.

1 Comment

I register the component if i have not registered it there should be a console error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.