This child property transfer does not work.
<ProductItemView :productItem="productItem"/>
The code of child component is:
<h4>{{ productItem.title }}</h4>
import { Vue } from 'vue-class-component';
import { ProductItem } from '../../store/types/productitem';
export default class ProductItemView extends Vue {
productItem: ProductItem = {
id: 0,
title: '',
description: '',
product_type: '',
image_tag: '',
created_at: 2000,
owner: '',
owner_photo: '',
email: '',
price: 0.0
}
}
Unfortunately the property is not set from this parent component.
<template>
<div class="container is-fluid">
<div class="tile is-ancestor">
<div class="tile is-parent" v-for="productItem in productItems" :key="productItem.id">
<ProductItemView :productItem="productItem"/>
</div>
</div>
</div>
</template>
What I am doing wrong? productItem is a property of the child component. And I call it from the parent component with :productItem.