The usage of the $ionicModal service is explained here: http://ionicframework.com/docs/api/service/$ionicModal/
I have a situation where it happens that I open more than two modals.
When modals are opened they are appended to DOM. So remember which ever modal you open
first, that will be
appended to DOM first.
Also, all modals have same css
To understand this why this overlap happens.
Modal1is opened -> Gets appended to DOM
Modal2is opened -> Gets appended to DOM
<body>TAG after Modal1's
Modal3is opened -> Gets appended to DOM
<body>TAG after Modal2's
Bug condition: If you have a button on
Modal3 to open
Modal2 or Modal1
Modal2 will open behind the Modal3.
WORKAROUND: You need to manipulate the
z-index of each modal so that in whatever order they are opened,the last modal you click should/will open over previously opened modal.
I cant provided you with a quick solution, because its not a quick fix;however I did solve it by reading the source Code and editing it.
Here is how I fixed my problem: A Pull Request to Ionic repo.
You can easily read the changes done there in order to have a fix. Its all basically manipulation of