Application behavior

Routing

Trace a redirect, guard, resolver, and lazy component in an isolated Angular Router.

Angular 22.3.2 · trace
Lesson flow Navigate. Recognize. Resolve. Outlet.
Navigate
Recognize
Resolve
Outlet

Objective

Follow navigation events and predict what the router outlet displays after success, cancellation, or failure.

Transcript

Angular 22.3.2

  1. The fixture starts at a shortcut URL and the router recognizes a redirect to the detail route.
  2. The route guard can cancel navigation before resolved data or the detail component is available.
  3. On the successful path the resolver provides the label and the lazy import loads the component. The outlet renders the resolved data.
  4. A failing resolver emits NavigationError. The fixture checks the outlet after failure. Its in-memory location keeps the current lesson URL intact.

Sources