Skip to Content
Beginning Server-Side Application Development with Angular
book

Beginning Server-Side Application Development with Angular

by Bram Borggreve
April 2018
Intermediate content levelIntermediate
110 pages
2h 12m
English
Packt Publishing
Content preview from Beginning Server-Side Application Development with Angular

Configuring the Service Worker

In the previous section, we added the service worker configuration file src/ngsw-config.json to our project, but we have not configured anything yet.

In this section, we will add two types of configurations: asset groups and data groups.

Asset and Data Groups

In the asset groups configuration, we specify how we want our service worker to handle the assets of our application. When we talk about assets, we should think of style sheets, images, external JS files, and so on.

Asset groups are defined using the following TypeScript interface:

interface AssetGroup { name: string; installMode?: 'prefetch' | 'lazy'; updateMode?: 'prefetch' | 'lazy'; resources: { files?: string[]; versionedFiles?: string[]; urls?: string[]; }; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Server-Side Enterprise Development with Angular

Server-Side Enterprise Development with Angular

Bram Borggreve
Building Large-Scale Web Applications with Angular

Building Large-Scale Web Applications with Angular

Chandermani Arora, Kevin Hennessy, Christoffer Noring, Doguhan Uluca
Angular UI Development with PrimeNG

Angular UI Development with PrimeNG

Oleg Varaksin, Sudheer Jonna

Publisher Resources

ISBN: 9781789342161Supplemental Content