I am facing a challenge with passing props to a component within the <ion-nav>
element.
I came across this helpful tutorial for using <ion-nav>
:
This is how my current code looks like:
<template>
<div>
<ion-nav :root="orderUpdate" id="modal-nav"></ion-nav>
</div>
</template>
<script>
import { defineComponent } from "vue";
import { IonNav } from "@ionic/vue";
import OrderUpdate from "@/components/OrderUpdate";
export default defineComponent({
name: "OrderUpdateModal",
components: {
IonNav
},
setup(){
const orderUpdate = OrderUpdate
return {
orderUpdate
}
},
created() {
console.log(this.positions);
},
props: {
order: [],
positions: [],
materials: [],
},
});
</script>
In the setup function, I use the OrderUpdate
component.
However, I am struggling to figure out how to pass props to this component. I attempted the following without any success:
<ion-nav :positions="positions" :materials="materials" :order="order" :root="orderUpdate" id="modal-nav"></ion-nav>
Does anyone have any suggestions on how I can solve this issue?