Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    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.

    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.