Angular PWA : Blank page on window reload after ng SW version change

Discussão em 'Angular' iniciado por user21021, Outubro 4, 2024.

  1. user21021

    user21021 Guest

    Facing below issue with Angular PWA I have used below lines of code to reload the app when there is a version change in the change. However , after a version change the app shows a blank page and doesnt load

    How to fix the blank page issue when a new version is pushed and user is active on the application. If the user refreshes the page, a blank page shows up

    constructor(private swUpdate: SwUpdate)
    {
    if(this.swUpdate.isEnabled){
    this.swUpdate.available.subscribe(()=>{
    window.location.reload();

    });
    }
    }


    Node : 14.21.3 npm 6.14.18 @angular/pwa: '0.1002.1' @angular/core : 12.2.17

    Continue reading...

Compartilhe esta Página