Course lesson

Make a Progressive Web Application from an Angular CLI project

In this lesson we will add a Service Worker and convert our app into a Progressive Web Application (PWA). We can do this by running ng add @angular/pwa.

Duration
4 min
Access
Pro
Transcript
Available

In this lesson we will add a Service Worker and convert our app into a Progressive Web Application (PWA). We can do this by running ng add @angular/pwa.

We will use Lighthouse to generate a score and gradually improve this score.

Using ngsw-config.json we define which assetGroups and dataGroups should be cached.

In index.html we add a noscript tag so there won't be a blank page if the javascript is disabled, and lastly we add robots.txt to make sure our site can be indexed.