You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
Yes
Description
I’m attempting to add an unsaved popup modal in my component. I’ve used lazy loading to load modules, and after that, I’m loading standalone components. However, I’ve encountered an issue: when applying a canDeactivate Guard, the canDeactivateFn loses the component reference. As a result, the component is destroyed before the canDeactivate Guard is called with a null component value. Is there any way to handle this? I’ve tried various approaches.
i'm using "@angular/router": "^17.0.7",
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
I’m going to close this as a support request since there’s no reproduction and the router does not destroy components until guards and resolvers have completed so there must be something else going on here.
This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular.
If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
Yes
Description
I’m attempting to add an unsaved popup modal in my component. I’ve used lazy loading to load modules, and after that, I’m loading standalone components. However, I’ve encountered an issue: when applying a canDeactivate Guard, the canDeactivateFn loses the component reference. As a result, the component is destroyed before the canDeactivate Guard is called with a null component value. Is there any way to handle this? I’ve tried various approaches.
i'm using "@angular/router": "^17.0.7",
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: