Update componentProps Parameters

I have already passed some parameters within componentProps, but is cannot update these parameters dynamicaly is there any way to do that?

    const loading = await this.modalCtrl.create({
      component: LoadingModalComponent,
      animated: false,
      showBackdrop: true,
      backdropDismiss: false,
      componentProps: {
        Upload: Upload,
        Message: Message
      }
    });

    await loading.present();

I am trying to change the upload parameter when i get data from the server by using the following method:

loading.componentProps.Update = true;

But it is not woking.
Any Suggestions??
Thank youu

Typically one passes things back from a modal using onDidDismiss.

i actually don’t want to get the returned data when a modal is dismissing, i need to update the parameters sent to the component while it’s open

you can submit a Subject via the componentProps and subscribe to it inside the Modal. When you emit something there, the modal can access it.

1 Like