Technical requirements
To complete this chapter, you’ll need:
- Angular v19+
- Angular Material
- RxJS v7
- Node.js v22+
- npm v11+ or pnpm v10+
The code for recipes in this chapter is placed in the GitHub repository at https://github.com/PacktPublishing/RxJS-Cookbook-for-Reactive-Programming/tree/main/Chapter08.
To make Angular applications work offline, we can run one simple command, which will add all the necessary configurations and a basic service worker to our project:
ng add @angular/pwa
Since service workers are enabled only in production mode, to observe each recipe in action, we must build our app and serve it locally. In each recipe, we will use the simple http-server library to host the client app locally and observe offline mode in the browser by running the following command in the terminal:
npm run build && http-server ${build-location} -c-1 –o
What is in common for all the recipes in this...