UNPKG

1.13 kBMarkdownView Raw
1# `@angular/pwa`
2
3This is a [schematic](https://angular.io/guide/schematics) for adding
4[Progressive Web App](https://web.dev/progressive-web-apps/) support to an Angular project. Run the
5schematic with the [Angular CLI](https://angular.io/cli):
6
7```shell
8ng add @angular/pwa --project <project-name>
9```
10
11Executing the command mentioned above will perform the following actions:
12
131. Adds [`@angular/service-worker`](https://npmjs.com/@angular/service-worker) as a dependency to your project.
141. Enables service worker builds in the Angular CLI.
151. Imports and registers the service worker in the application module.
161. Updates the `index.html` file:
17 - Includes a link to add the [manifest.webmanifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) file.
18 - Adds a meta tag for `theme-color`.
191. Installs icon files to support the installed Progressive Web App (PWA).
201. Creates the service worker configuration file called `ngsw-config.json`, specifying caching behaviors and other settings.
21
22See [Getting started with service workers](https://angular.io/guide/service-worker-getting-started)
23for more information.