Separate your concerns with router's resolver
summary
Adds concrete steps: implement Resolve<T> to return the HTTP Observable so the Router waits for data resolver waits for Observables and Promises, remove HTTP calls from component constructors and read values from ActivatedRoute.snapshot.data, compose multiple resolvers for shared endpoints, use Router.events to show a single global loader instead of per-resolver notifications use Router.events to show a single loader, and register a Router errorHandler to centralize resolver errors register a Router errorHandler for global error UI.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:40Agenda
- 2:04Why resolver
- 5:25The app
- 6:54Under the hood
- 9:52Create basic resolver
- 12:51Create other resolver
- 13:25Two resolvers
- 14:43Service
- 15:36Router Events
- 16:21Error Handling
- 17:16Error Handler
- 18:19Summary








