Skip to content
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

Feature Request: Documentation to unit test functional router guard #5455

Closed
qdelettre opened this issue Apr 18, 2023 · 3 comments · Fixed by #5530
Closed

Feature Request: Documentation to unit test functional router guard #5455

qdelettre opened this issue Apr 18, 2023 · 3 comments · Fixed by #5530
Assignees
Labels

Comments

@qdelettre
Copy link

Describe the feature or problem you'd like to solve

Angular deprecated the use of class based router guard, in favor of functional guard.
I did not find documentation to test router guard of such nature on the reference page (https://ng-mocks.sudo.eu/guides/routing-guard)

Proposed solution

Writing a documentation for this kind of implementation (functional router guard) will be needed, as more and more developers will follow angular guideline to use such instead of class based guards.

Additional context

Thanks @satanTime for the message on gitter.

--
I tried to follow https://ng-mocks.sudo.eu/guides/routing-guard but it does not seems to work (tested canMatchFn & canActivateFn guards)

@qdelettre qdelettre added the enhancement New feature or request label Apr 18, 2023
satanTime added a commit that referenced this issue Apr 23, 2023
feat(core): supporting functional guards and resolvers #5455
@satanTime
Copy link
Member

v14.10.0 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.

@qdelettre
Copy link
Author

Thanks a lot @satanTime

@satanTime
Copy link
Member

Always welcome, @qdelettre! 🤘🤘🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants