Loading topic
Routes array, <router-outlet>, routerLink, and route parameters. It also assumes you can read RxJS Observables and Promises, and that you understand dependency injection. Later chapters b2 min readRoutes array, router-outlet, route parameters), and how dependency injection works. It explains why guards and resolvers exist and what job each one does. Later chapters cover how to write them.2 min readRoutes array. You should also be comfortable reading an RxJS Observable or a Promise.2 min readinject() and attach it to a route with canActivate. It covers the values a guard may return and what the router does with each one.2 min readRoutes array, and how inject() works. You should also be comfortable with Observables and Promises.2 min readinject() and know the basic return types of a guard (boolean, UrlTree, or an Observable or Promise of either). Here we focus on the redirect case: how to block a navigation and send the user somewhere else.2 min readcanActivate guard and return a UrlTree. It also assumes you know how nested children routes work.2 min readinject() and know how a Routes array is configured. A canDeactivate guard runs when the user tries to leave a route. It can stop a navigation that would throw away unsaved work.2 min readloadComponent and loadChildren, and how to write a functional guard with inject(). If not, review those first.2 min readResolveFn, and that you have a Routes array with nested and lazy-loaded routes. Here you will learn the sequence the router follows, so you can predict when each of your functions runs and avoid wasted work.2 min readinject(). It covers how to write a resolver and attach it to a route. Reading the data in a component and handling failures are covered in later chapters.2 min readinput(), and the Routes array. It also assumes you have read the previous chapter, where productResolver was attached to a route. Here you will learn the two ways a component can read what a resolver returned.2 min readResolveFn, read route data in a component, and use RxJS operators such as catchError. It covers what happens when a resolver fails and how to recover.2 min readResolveFn and that you have read the chapters on guards and the router lifecycle. You should be comfortable with Angular signals and basic RxJS.2 min readTestBed, the functional guard and resolver forms from earlier chapters, and basic Jasmine or Jest syntax. Functional guards and resolvers are plain functions. They call inject(), so you have to run them inside an injection context. `TestBed.runInInjectionC2 min readcanActivate guard, return a UrlTree, and read a resolver's data in a component. Here you will see what a guard protects and what it does not.2 min read