Answer the question
In order to leave comments, you need to log in
Why is the component not showing up?
Good afternoon, I made a component on Laravel, and it does not appear on my site.
<template>
<div>
<div class="blog" v-for="prod in myData">
<li >{{ prod.title}}</li>
</div>
</div>
</template>
<script>
export default {
props: ['myData']
}
</script>
<style>
.blog {
width: 200px;
height: 200px;
border: 1px solid black;
color:red;
}
</style>
Answer the question
In order to leave comments, you need to log in
I would assume that the component is actually rendered, but the problem is with the data. How do you pass data to a component? I’ll make one more guess, it looks like this for you:
Well, as the documentation suggests :
HTML attribute names are case-insensitive, so browsers interpret any uppercase characters as lowercase. This means that when using templates in the DOM, camelCase-style input parameters must use their kebab-case-style equivalents.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question