bug: [Angular] inline ion-modal is not and cannot be dismissed when the parent component is destroyed #30389
Labels
needs: investigation
This issue is waiting on more investigation from the Ionic Team.
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
When opening an ion-modal inline, if the parent component gets destroyed when the modal is open, the modal is not dismissed nor destroyed
Expected Behavior
The modal should close when the parent component is destroyed
Steps to Reproduce
ion-modal
inside a child-componentngIf
or similar)Code Reproduction URL
https://stackblitz.com/edit/tmgkbwps
Ionic Info
Ionic:
Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 8.5.6
@angular-devkit/build-angular : 19.2.6
@angular-devkit/schematics : 19.2.6
@angular/cli : 19.2.6
@ionic/angular-toolkit : 11.0.1
Capacitor:
Capacitor CLI : 7.2.0
@capacitor/android : 7.2.0
@capacitor/core : 7.2.0
@capacitor/ios : not installed
Cordova:
Cordova CLI : not installed
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.18.3 (/Users/me/.volta/tools/image/node/20.18.3/bin/node)
npm : 10.8.2
OS : macOS Unknown
Additional Information
I have not found any workaround for this besides use some flag inside the parent component to "render the content", which is dangerous since we can not prevent a regular Angular
if
usage in the future.The text was updated successfully, but these errors were encountered: