Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular Cookbook

You're reading from   Angular Cookbook Over 80 actionable recipes every Angular developer should know

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781803233444
Length 536 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Muhammad Ahsan Ayaz Muhammad Ahsan Ayaz
Author Profile Icon Muhammad Ahsan Ayaz
Muhammad Ahsan Ayaz
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Winning Component Communication 2. Working with Angular Directives and Built-In Control Flow FREE CHAPTER 3. The Magic of Dependency Injection in Angular 4. Understanding Angular Animations 5. Angular and RxJS – Awesomeness Combined 6. Reactive State Management with NgRx 7. Understanding Angular Navigation and Routing 8. Mastering Angular Forms 9. Angular and the Angular CDK 10. Writing Unit Tests in Angular with Jest 11. E2E Tests in Angular with Cypress 12. Performance Optimization in Angular 13. Building PWAs with Angular 14. Other Books You May Enjoy
15. Index

What this book covers

Chapter 1, Winning Component Communication, explains different techniques to use to implement communication between components in Angular. @Input() and @Output() decorators, services, and lifecycle hooks are covered. The chapter also covers Angular Signals, which became stable in Angular v17.

Chapter 2, Working with Angular Directives and Built-In Control Flow introduces Angular directives and some recipes that use attribute directives, structural directives, and the Directive Composition API.

Chapter 3, The Magic of Dependency Injection in Angular, includes recipes that cover optional dependencies, configuring an injection token, using the providedIn: 'root' metadata for Angular services, value providers, and aliased class providers.

Chapter 4, Understanding Angular Animations, contains recipes for implementing multi-state animations, staggering animations, keyframe animations, and animations for switching between routes in your Angular apps.

Chapter 5, Angular and RxJS – Awesomeness Combined, covers recipes on RxJS for executing sequential and parallel HTTP calls. It also has some recipes on the usage of the combineLatest, flatMap, debounceTime, and switchMap operators and covers some tips and tricks about using RxJS streams.

Chapter 6, Reactive State Management with NgRx, has recipes concerning the famous NgRX library and its core concepts. It covers core concepts such as NgRx actions, reducers, selectors, and effects and looks at using packages such as @ngrx/store-devtools and @component/store.

Chapter 7, Understanding Angular Navigation and Routing, explores recipes on lazily loaded routes, route guards, route preloading strategies, and some interesting techniques to be used with the Angular router.

Chapter 8, Mastering Angular Forms, covers recipes for template-driven forms, reactive forms, form validation, testing forms, form arrays, and creating your own form control.

Chapter 9, Angular and the Angular CDK, has a lot of cool Angular CDK recipes, including ones on virtual scroll, keyboard navigation, the overlay API, the CDK Menu, CDK drag and drop, the CDK stepper API, and the CDK Listbox API.

Chapter 10, Writing Unit Tests in Angular with Jest, covers recipes for unit testing with Jest, exploring global mocks in Jest, mocking services/child components/pipes, using Angular CDK component harnesses, and unit testing Observables.

Chapter 11, E2E Tests in Angular with Cypress, has recipes on E2E testing with Cypress in Angular apps. It covers validating forms, waiting for XHR calls, mocking HTTP call responses, using bundled packages with Cypress, and using fixtures in Cypress.

Chapter 12, Performance Optimization in Angular, contains some cool techniques to improve an Angular app’s performance by using the OnPush change detection strategy, lazily loading feature routes, detaching the change detector from a component, using web workers with Angular, using pure pipes, adding performance budgets to an Angular app, and using the webpack-bundle analyzer.

Chapter 13, Building PWAs with Angular, contains recipes to create a PWA with Angular. It covers specifying a theme color for the PWA, using a device’s dark mode, providing a custom PWA install prompt, precaching requests using Angular’s service worker, and using App Shell.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime