1 | # `@angular/pwa`
|
2 |
|
3 | This is a [schematic](https://angular.io/guide/schematics) for adding
|
4 | [Progress Web App](https://web.dev/progressive-web-apps/) support to an Angular app. Run the
|
5 | schematic with the [Angular CLI](https://angular.io/cli):
|
6 |
|
7 | ```shell
|
8 | ng add @angular/pwa
|
9 | ```
|
10 |
|
11 | This makes a few changes to your project:
|
12 |
|
13 | 1. Adds [`@angular/service-worker`](https://npmjs.com/@angular/service-worker) as a dependency.
|
14 | 1. Enables service worker builds in the Angular CLI.
|
15 | 1. Imports and registers the service worker in the app module.
|
16 | 1. Adds a [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest).
|
17 | 1. Updates the `index.html` file to link to the manifest and set theme colors.
|
18 | 1. Adds required icons for the manifest.
|
19 | 1. Creates a config file `ngsw-config.json`, specifying caching behaviors and other settings.
|
20 |
|
21 | See [Getting started with service workers](https://angular.io/guide/service-worker-getting-started)
|
22 | for more information.
|