I\'m having a hard time integrating angulars service worker into my application. I followed the guide and it works so far. I can create a shortcut on my homescreen and launc
To check if newer a version of Angular is available, you can call below method from any component, or just copy the IsNewerVersionAvailable method in app.component.
export class DataService {
constructor(private http: HttpClient, private swUpdate: SwUpdate) { }
private available: boolean = false;
IsNewerVersionAvailable() {
if (this.swUpdate.isEnabled) {
this.swUpdate.available.subscribe(() => {
this.available = true;
});
console.log(this.available);
}
return this.available;
}
}