Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 938 Bytes

unsaved-changes.guard.md

File metadata and controls

22 lines (15 loc) · 938 Bytes
Title Added Status Last reviewed
Unsaved Changes guard
v6.6.0
Active
2024-02-06

This guard prevents deactivating route if page has any unsaved changes. User needs intentionally discard changes through displayed modal to leave actual route.

Class members

Methods

  • canDeactivate(): boolean | Observable<boolean>
    Allows to deactivate route when there is no unsaved changes, otherwise displays dialog to confirm discarding changes.
    • Returns boolean | Observable<boolean> - true when there is no unsaved changes or changes can be discarded, false otherwise.

See also