Loading topic
provideRouter when the application starts up. If either one is missing or set up wrong, nothing els5 min readinject(), and the route table built with Routes and provideRouter in the previous chapter. In this chapter you learn where routed components actually appear on the page and how the router puts them there. You also learn how 5 min readRoutes array registered with provideRouter and a <router-outlet /> in your root component. Here you connect the two: you give users links that change the URL without reloading the page, and you style whichever link matches the current URL. You should be 5 min readRoutes array, register it with provideRouter, and render it with RouterOutlet and RouterLink, as covered in the earlier chapters. You should also know TypeScript and standalone components.5 min read42 in /products/42. You declare it in the route definition with a colon prefix (products/:id), and the router pulls the matching value out of the URL when navigation succeeds. This chapter covers three ways to read that value: 6 min read42 in /products/42. Query parameters and fragments describe how to show it: the active filter, the sort order, the current page, or the section the user should land on. This chapter shows how to set them, read them, keep 4 min readRouter service and call one of its navigation methods.5 min readinject(), and basic RxJS. It also assumes you have read the earlier chapters on provideRouter, RouterOutlet, RouterLink, and route parameters.5 min readapp.routes.ts imports statically ends up in the initial JavaScript bundle. That holds even for screens most users never open. Lazy loading tells the router to fetch a component, or a whole group of routes, only when a navigation first needs it. This chapter covers `loadCompone4 min readmap and catchError, and how Angular services use HttpClient.5 min readRouter.events observable. When you subscribe to that stream you can show a loading bar, record page views, log failed navigatio4 min read/products/42. 5 min readTestBed.createComponent skip the router entirely. Those tests cannot tell you whether a :id parameter reaches the component's input, whether a guard redirects to /login, or whether a resolver's data arrives before the view renders. `RouterTestin4 min read