Skip to content

Glossary: Angular Beyond the Basics

CanDeactivateFn

Also written: canDeactivate

A guard that runs before the user leaves a route and gets the page's component. `unsavedChangesGuard` uses it to ask "Discard your changes?".

Where the book teaches it

Related terms

Guarddirty / pristine