Adds ServiceWorker Service
Adds ServiceWorker Service for Updating PWA
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AuthService } from './shared/auth/auth.service';
|
||||
import {UpdateService} from "./shared/service-worker/update.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -7,10 +8,12 @@ import { AuthService } from './shared/auth/auth.service';
|
||||
styleUrls: ['./app.component.css']
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
|
||||
title = 'frontend-hideyoshi.com';
|
||||
|
||||
constructor(private authService: AuthService) {}
|
||||
constructor(private authService: AuthService, private serviceWorker: UpdateService) {
|
||||
this.serviceWorker.checkForUpdates();
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.authService.autoLogin();
|
||||
|
||||
Reference in New Issue
Block a user