What this book covers
Chapter 1, Scalable Front-End Architecture for Angular Applications, provides you with knowledge about frontend architectures, enabling you to make the right decisions when setting up your workspace and developing scalable frontend systems. In this chapter, you will also create your own Nx monorepo, ready to handle hundreds of Angular applications and libraries without breaking a sweat.
Chapter 2, Powerful Angular Features, brings you up to speed with the latest developments and covers some of the most powerful features of the Angular framework. You will learn about new concepts such as standalone components and signals. Additionally, this chapter will provide a deep dive into the Angular router, component communication, and dependency injection.
Chapter 3, Enhancing Your Applications with Directives, Pipes, and Animations, shows you how to write more reusable code by utilizing directives and pipes. You will learn about best practices, common pitfalls, and design choices when developing custom pipes and directives, or when using the built-in options of the Angular framework. Furthermore, this chapter teaches you about creating and reusing UI animations within the Angular framework to spice up your web applications.
Chapter 4, Building Forms Like a Pro, provides a step-by-step guide to developing template-driven, reactive, and dynamic forms. You will learn how to validate your input fields for each approach and how to handle error messages. By the end of this chapter, you will have built a template-driven form, converted it into a reactive form, and finally, made the same form using a dynamic form approach.
Chapter 5, Creating Dynamic Angular Components, focuses on developing reusable components for complex design needs. You’ll learn about content projection, projection slots, template variables and references, dynamically creating components, lazy-loading non-routed components, and developing your own widget component, with the ability to load and mount components on demand based on user input.
Chapter 6, Applying Code Conventions and Design Patterns in Angular, discusses how to incorporate structure and patterns into your Angular applications. From code conventions and best practices to commonly used design patterns such as the facade, decorator, and factory pattern, this chapter will give you the knowledge and structure needed to develop scalable and robust Angular applications. We will end this chapter by developing a generic type-safe HTTP service with a model adapter that automatically converts your DTOs to view models, and vice versa.
Chapter 7, Mastering Reactive Programming in Angular, emphasizes the advantages of reactive programming and shows you how to implement it in your Angular applications using RxJS and signals. You will learn to handle asynchronous data streams using RxJS and synchronous data with signals. We will explore how RxJS and signals can be combined and distinguish when to use RxJS and when to use signals to handle reactivity within your Angular applications.
Chapter 8, Handling Application State with Grace, teaches you everything you need to know about application state and how to handle it gracefully within your Angular applications. We will create a facade service to connect your component layer with your application state and make three different implementations to handle the global application state. We will start by creating a custom application state solution using RxJS. Then, we will convert it to a custom solution using signals. Lastly, we look at the shortcomings of RxJS and signals when handling the global application state of complex applications and implement NgRx to mitigate these shortcomings.
Chapter 9, Enhancing the Performance and Security of Angular Applications, helps you develop more performant Angular applications by providing a detailed explanation of the Angular change detection mechanism and showcasing other factors that impact application performance, showing you how to reduce their impact. Additionally, this chapter teaches you how to develop secure Angular applications by exploring possible attack surfaces for malicious actors and how to mitigate them.
Chapter 10, Internationalization, Localization, and Accessibility of Angular Applications, enables you to develop Angular applications accessible to people with different impediments, speaking different languages, or who are used to various formats. You will implement the Transloco library for i18n and i10n and learn about web accessibility guidelines.
Chapter 11, Testing Angular Applications, provides you with hands-on experience in writing automated tests for Angular applications. You will learn about the different types of tests used in frontend applications and how to write and run unit tests using Jest and end-to-end tests using the Cypress test framework.
Chapter 12, Deploying Angular Applications, outlines the steps for building and deploying Angular applications located in an Nx monorepo. You will learn how to analyze your bundle sizes, run linting, and build commands for one or more projects in your Nx monorepo and how to automate your deployment process.