swUpdate debug

This commit is contained in:
2023-06-23 18:56:05 +02:00
parent 70277c69fe
commit de8f5e3e90

View File

@@ -2,6 +2,7 @@ import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { SwUpdate } from '@angular/service-worker';
import { NotificationsService } from './services/notifications.service';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-root',
@@ -15,7 +16,7 @@ export class AppComponent {
private readonly _swUpdate: SwUpdate,
private _notifications: NotificationsService
) {
console.log('Start versionUpdates subscribe');
console.log('Start versionUpdates subscribe', this._swUpdate.isEnabled, environment.production);
this._swUpdate.versionUpdates.subscribe((evt) => {
console.log('Version update', evt);
if (evt.type === 'VERSION_READY') {