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] Navigation Guards #28

Open
BurkusCat opened this issue Oct 14, 2023 · 0 comments
Open

[Feature] Navigation Guards #28

BurkusCat opened this issue Oct 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@BurkusCat
Copy link
Owner

Is your feature request related to a problem? Please describe.
If I have unsaved changes on a page, I want to prevent the user from leaving it unless they confirm in a dialog they want to discard the changes. If a navigation initiates to an authenticated part of the app, I want to prevent the user from being allowed to navigate to that page unless they are first logged in.

Describe the solution you'd like
Something like Angular's route guards
https://angular.io/api/router/CanActivate
https://angular.io/api/router/CanDeactivate

Describe alternatives you've considered
N/A

Proposed APIs
If possible, try to propose how the API might look. For example:

Task<bool> CanNavigateFrom()
Task<bool> CanNavigateTo()

Additional context
N/A

@BurkusCat BurkusCat added the enhancement New feature or request label Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant