What this book covers
Chapter 1, Building Your First Angular Application
In this chapter, we set up the development environment by installing the Angular CLI and learn how to use schematics (commands) to automate tasks such as code generation and application building. We create a new simple application using the Angular CLI and build it. We also learn about some of the most useful Angular tools that are available in Visual Studio Code.
Chapter 2, Introduction to TypeScript
In this chapter, we learn what TypeScript is, the language that is used when creating Angular applications, and what the most basic building blocks are, such as types and classes. We take a look at some of the advanced types available and the latest features of the language.
Chapter 3, Structuring User Interfaces with Components
In this chapter, we learn how a component is connected to its template and use a decorator to configure it. We take a look at how components communicate with each other by passing data from one component to another using input and output bindings and learn about the different strategies to detect changes in a component. We also learn how to execute custom logic during the component lifecycle.
Chapter 4, Enriching Applications Using Pipes and Directives
In this chapter, we take a look at Angular’s built-in pipes and we build our own custom pipe. We learn how to create directives and leverage them through an Angular application that demonstrates their use.
Chapter 5, Managing Complex Tasks with Services
In this chapter, we learn how the dependency injection mechanism works, create and use services in components into components, and how to create providers in an Angular application.
Chapter 6, Reactive Patterns in Angular
In this chapter, we learn what reactive programming is and how we can use observables in the context of an Angular application through the RxJS library. We also take a tour of all the common RxJS operators that are used in an Angular application.
Chapter 7, Tracking Application State with Signals
In this chapter, we learn the basic concepts of the Signals API and the rationale behind its use. We explore how to use signals for tracking the state of an Angular application. We also take a look at signals interoperability with RxJS and how they can play nicely together in a sample application.
Chapter 8, Communicating with Data Services over HTTP
In this chapter, we learn how to interact with a remote backend API and perform CRUD operations with data in Angular. We also investigate how to set additional headers to an HTTP request and intercept it before sending the request or upon completion.
Chapter 9, Navigating through Applications with Routing
In this chapter, we learn how to use the Angular router in order to activate different parts of an Angular application. We find out how to pass parameters through the URL and how to break an application into child routes that can be lazy loaded. We then learn how to guard against our components and how to prepare data prior to initialization of the component.
Chapter 10, Collecting User Data with Forms
In this chapter, we learn how to use Angular forms in order to integrate HTML forms into an application and how to set them up using FormGroup and FormControl. We track the interaction of the user in the form and validate input fields.
Chapter 11, Handling Application Errors
In this chapter, we learn how to handle different types of errors in an Angular application and learn about errors that come from the framework itself.
Chapter 12, Introduction to Angular Material
In this chapter, we learn how to integrate Google Material Design guidelines in to an Angular application using a library called Angular Material, developed by the Angular team. We take a look at some of the core components of the library and how to use them. We discuss the themes that are bundled with the library and how to install them.
Chapter 13, Unit Testing Angular Applications
In this chapter, we learn how to test Angular artifacts and override them in a test, what the different parts of a test are, and which parts of a component should be tested.
Chapter 14, Bringing Applications to Production
In this chapter, we learn how to use the Angular CLI to build and deploy an Angular application. We take a look at how to pass environment variables during the build and how to perform build optimizations prior to deployment.
Chapter 15, Optimizing Application Performance
In this chapter, we learn what Core Web Vitals (CWV) are and how they affect the performance of an Angular application. We explore three different ways to improve CWV metrics: how to render an application server-side, how to benefit from hydration, and how to optimize our images.