I'm passing% object_to% to a component and within this component I try to access past values:
<orders-list :orders="items"></orders-list>
Component array
<template>
<div>
<b-form-select
v-model="filterChannel"
:options="Array.from(
new Set(
orders.map(item => item.channel)
)
)"></b-form-select>
</div>
</template>
<script>
export default {
props: ['orders'],
...
created(){ console.log(this.orders); } // null
}
</script>
I can not get all the information in the orders-list:
but the console always sends me an error saying that it can not access the template
method of map
even rendering the items ...
However, if I use only null
I can see the null
with all the requests inside.
How can I access a console.log(this)
within a component's methods?