New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Navigation Hooks are never called (beforeEnterHook, beforeLeaveHook) #22516
Comments
Thanks for the issue. Can you provide a code reproduction of the issue and provide a link to the GitHub repo? |
Thanks for the issue! This issue has been labeled as Please provide a reproduction with the minimum amount of code required to reproduce the issue. Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. For a guide on how to create a good reproduction, see our Contributing Guide. |
Here is the reproduction code. https://github.com/igorovic/ionic-bug-navhooks You should check the file app-root.tsx |
Thanks! Can you try the following dev build and let me know if it resolves the issue?
|
Yes it works 👍 Side note: My VScode ts linter is not happy with my custom component since I installed this dev build. |
Are you getting an error? |
Never mind, it's an issue in my custom component that broke the linter. Regarding the navigation hook it's fixed in => |
Glad it's fixed! Thanks for double checking the linter issue. |
Thank you for the fix 👍 . I would have done it myself but I didn't read the contribution guide yet. 😄 |
Thanks for the issue. This has been resolved via #22521, and a fix will be available in an upcoming release of Ionic Framework. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
ion-route properties
beforeEnter
andbeforeLeave
are removed in function matchesPathsnippet
should be something like this
Because then the navigation hooks are used in router.tsx
snippet
But since those properties where previously removed they are always undefined.
The text was updated successfully, but these errors were encountered: