Skip to main content

Router events, navigation lifecycle and testing

Learn Router events, navigation lifecycle and testing (Module 10 · Angular Routing, Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Router events and the navigation lifecycle • The router announces what it is doing through an observable, router.events . Typical use: show a loading bar while navigating. • Navigation lifecycle in short: NavigationStart , route recognised, guards run, resolvers run, ActivationStart , components activate, NavigationEnd (or NavigationCancel / NavigationError ).

More lessons in Module 10 · Angular Routing