Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Server-Side Enterprise Development with Angular

You're reading from   Server-Side Enterprise Development with Angular Use Angular Universal to pre-render your web pages, improving SEO and application UX

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher
ISBN-13 9781789806267
Length 142 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Bram Borggreve Bram Borggreve
Author Profile Icon Bram Borggreve
Bram Borggreve
Arrow right icon
View More author details
Toc

Installing Angular PWA

Angular comes with great support for service workers, and in recent versions, it has become super easy to set up. Whereas previously you had to manually install the dependencies, edit the Angular config, import a module, and configure it, you can now simply use the ng add command that got introduced in Angular CLI v6.

Exercise 46: Adding Angular PWA

In this exercise, we will add Angular PWA to our app. Follow these steps to complete this exercise:

  1. Open the terminal in the project directory.
  2. Install the necessary dependencies using the npm command:
    ng add @angular/pwa --project angular-social
  3. When the installation is successful, we should see the new package added to the dependencies object in our project's package.json file.

Let's move on to the next section, where we will enable the service worker in the application.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime