ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: [SOLVED] Launch two modals, one after the other, the first modal doesn't close

Open EricDosReis opened this issue 11 years ago • 3 comments

Type: bug

Platform: all

I have tried launch a modal by another modal, but when I try close the last modal, the first modal doesn't close. Has a solution for it? Sorry by my english.

EricDosReis avatar May 21 '15 19:05 EricDosReis

What's happening here is that you are losing your first modal reference after assigning your second modal reference. If you have to launch another modal within a modal I would suggest assigning the second modal to a different $scope.modal variable instead of re-using that. I assume that's what is going on. Hard to say without any code.

ghost avatar May 21 '15 19:05 ghost

Yes, I know I'm losing modal reference. Thank you, but your solution does not fit in that case, I did a modal service and I need to find a way to make it dynamically.

EricDosReis avatar May 21 '15 21:05 EricDosReis

Okay, I solved my problem creating an array with modals in my modal service, and passing modal that I want to open and close as parameter.

Thank you for your attention.

EricDosReis avatar May 22 '15 13:05 EricDosReis