Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70448

Show one modal at a time in a loop

$
0
0

@helpmelearn wrote:

I’m trying to show the user a series of data values in a modal and have the userpick an answer, then show the next one.
I’m getting a list of the data back and was planning on showing them one at a time. I’m looping through the list, and all the modals get created all at one.

 this.questionList.forEach((quest) => {
                            //Show each one
                            let showQues = this.modalCtrl.create(QuestionModal, {question: quest}, {enableBackdropDismiss : false});
                            showQues.onDidDismiss( (data) => {
                                alert("Your data is " + data);
                            });
                            showQues.present();
                        });

My liniar background wanted the user to show one modal, let the user do something with it. After its closed show the next modal.

Is this possible?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>