How to give a Nacvontroller.push inside a modal

Asked

Viewed 17 times

0

Good afternoon, I have a model and I need to recover values that were selected into it, my doubt is:

how to put this code:

this.navCtrl.push(ModalAcessoDesktopPage, {
            list: this.lista.selectionModel.selected
          })

within that:

 this.modalCtrl.create(ModalAcessoDesktopPage,
            {enableBackdropDismiss: false}
          ).present();

Thank you.

  • Your question is not very clear. What do you mean by "recover values that have been selected into it". What result do you expect?

  • this list.selectionModel.Selected, returns me an array of items that were selected, I need to return this array on another page that opens through this modal above

  • Try this: https://forum.ionicframework.com/t/how-to-pass-data-to-modal-ionic-2/82323/3 add one more key where it is {enableBackdropDismiss: false} with the value you want to spend.

  • Let me get this straight, you want to select a value in the modal and recover the values when you leave it?

  • Péttrin, I want to take the value I already have on the page, and use it in the modal, the page returns me an array of selected items, I need these items to apply the logic to them within the modal

  • You can add all the code of that file to the question?

  • Edson, the method you told me about worked out, thank you !!

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.