Summary

This was a fairly short chapter, but we still covered a lot of ground. In this chapter, we created the skeleton for our application, including creating the components that we had our routes mapped to. We then went through a step-by-step process of configuring routing for our application. This included importing the two required modules (that is, RoutingModule and Routes), coding up routing rulesets in the form of mapping objects, and specifying where the routed components were to be rendered.

We also installed and integrated Bootstrap into our application, and created our Bootstrap navigation bar in our root component's template. We then took a look at how to make Angular aware of installed node packages, Bootstrap and jQuery in particular, since that is how we installed Bootstrap and its dependencies (that is, jQuery and Popper).

Although we didn't make use of parameterized routes and route guards in this chapter, we mentioned them here because we'll be making use of them later in the book—in Chapter 12, Integrating Backend Data Services, and Chapter 14, Advanced Angular Topicsand in the spirit of the book, discussing things at the time we need them and not before, we are deferring their demonstration until the appropriate times.

And to wrap this chapter up, we took a look at the two client-side routing strategies that Angular lets us choose from.

We've mentioned the word components over and over again in this chapter, since routing maps URL paths to components. We've even created several components using the CLI, but we've spent no time understanding components. That's perfectly fine because, as was mentioned, you didn't need to understand components in order to understand routing. Now that we have routing under our belt, we'll be looking at components in the chapters ahead. But just before we do that, there is another short chapter, Chapter 5, Flex-layout – Angular's Responsive Layout Engine, that we're going to quickly cover. It's a bit of an odd-ball chapter because Flex-layout is an alternative to Bootstrap's responsive grid and, as such, it is not at all required to build an Angular application. However, I thought it may be of interest to you. With that said, let's turn our attention to Flex-layout.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.140.18