Csaba
Csaba

Reputation: 2096

Universal Server Side Rendering stops Rendering Content after Installing PWA in Angular 6.0.3

I've built a simple Angular 6 application and integrated Universal into it by following this tutorial: Angular Universal Tutorial

Link to GitHub repo that I created: Angular Universal SSR GitHub Repo

Universal SSR is working great, it renders content (both static and dynamic from Firebase Real Time Database and Firestore) without any issues, however, after I install PWA following the official documentations from PWA tutorial, Universal SSR stops working without any errors... but PWA works.

Can anyone tell me why SSR stops working after installing PWA?

Thanks in advance!

Upvotes: 7

Views: 717

Answers (2)

NiKhil Kutewalla
NiKhil Kutewalla

Reputation: 103

When you Angular PWA (service worker) to Angular SSR project.

  • Kindly add "navigationUrls": [] in your ngsw-config.json file

The below screen shot will bind SSR html on view source.

enter image description here

Upvotes: 1

Bender
Bender

Reputation: 103

I found something that worked for my website but I'm using a new version of angular and universal

    "@angular/core": "~8.2.4",
    "@angular/pwa": "^0.803.19",
    "@angular/service-worker": "~8.2.4",
    "@ng-toolkit/universal": "^7.1.2"

How to make Angular Universal and PWA work together?

Upvotes: 2

Related Questions