How can I detect if ionic 2 alert ui component instance is already open in order not to present another alert ?
相关问题
- Plugin with id 'com.google.gms.google-services
- How to pass form data from Ionic 3 to PHP file?
- apk big size with ionic 4 build
- Ionic Spinner not showing up
- Is there any way to make the background of a 3D-mo
相关文章
- Ionic 4: Hardware Back Button Reloading Applicatio
- ionic - Copy/paste in input field in iOS 10 not wo
- net::ERR_CONNECTION_REFUSED ionic
- Typescript Error: Property 'files' does no
- ionic 4 + angular: routerLink only works first tim
- Ionic conditional class css
- Ionic tabs and side menu navigation issue
- After reseting plugins, Ionic 2 program doesn'
You can create an
AlertService
to handle that with more options without inject an event for the buttonsRegards, Nicholls
I have another idea that you can assign message for a variable and check new message is equal to it or not. If equal, return. This is my code and hope you enjoy with it.
I ended up writing a wrapping provider for Ionic's Alert controller like so :
where
alertPresented
flag prevents more than one instance from being presented