I needed a custom version of ion-alert that would use a ViewChild (instead of form elements as the body of the alert). I copied ion-alert and made a few tweaks - instead of taking input type and stuff, it just takes a component (similar to ion-modal).
Everything is perfect except it doesn’t perform the transitions, so you can’t actually see the alert. I can’t understand how the transitions are even fired with ion-alert, the only code seems to be this:
config.setTransition('alert-pop-in', AlertPopIn); config.setTransition('alert-pop-out', AlertPopOut); config.setTransition('alert-md-pop-in', AlertMdPopIn); config.setTransition('alert-md-pop-out', AlertMdPopOut); config.setTransition('alert-wp-pop-in', AlertWpPopIn); config.setTransition('alert-wp-pop-out', AlertWpPopOut);
I don’t see where these class names (?) are connected to the creation and dismiss events.
In my “copy” of ion-alert, if I explore the DOM, I can see my
<popup> element in place of
<ion-alert>, but the opacity stays at 0 because these transitions are not being executed.
I posted some code here:
Another issue is how to pass the [providers] from the app.component into the ViewChild so that child component doesn’t have to declare separate versions of the providers.
Any help would be greatly appreciated!