angular-pwa

Angular 7 PWA + Azure Functions Gateway Timeout 504 only with Https

霸气de小男生 提交于 2019-12-21 13:08:48
问题 So the title pretty much says it all! I have an Angular 7 app compiled as PWA my package.json is below. My backend api is written in AzureFunctions V2. "dependencies": { "@angular-devkit/core": "^7.0.5", "@angular/animations": "^7.0.3", "@angular/cdk": "^7.0.3", "@angular/common": "^7.0.3", "@angular/compiler": "^7.0.3", "@angular/core": "^7.0.3", "@angular/flex-layout": "^7.0.0-beta.19", "@angular/forms": "^7.0.3", "@angular/http": "^7.0.3", "@angular/material": "^7.0.3", "@angular/platform

How to intercept app install prompt in Angular PWA?

给你一囗甜甜゛ 提交于 2019-12-14 03:51:31
问题 I have created a PWA using Angular guidelines. I am facing problem intercepting the app install banner. I am using this code to defer it to a later point: let deferredPrompt; window.addEventListener('beforeinstallprompt', (e) => { // Prevent Chrome 67 and earlier from automatically showing the prompt e.preventDefault(); // Stash the event so it can be triggered later. deferredPrompt = e; console.log("Intercepting the app install banner prompt"); setTimeout(function() { deferredPrompt.prompt()

NullInjectorError: No provider for SwUpdate! SwUpdate does not work Angular 5

强颜欢笑 提交于 2019-12-07 05:34:15
问题 Now I know there are a million posts about No Provider for such and such service, I know it needs to go in the providers please read my entire post. Basically I am trying to use SwUpdate to check to see if there is an update if so, refresh the browser: import { SwUpdate } from '@angular/service-worker'; ... export class ... constructor( private _swUp: SwUpdate ){} ngOnInit() { this.checkForUpdate(); } checkForUpdate() { if (this._swUp.isEnabled) { this._swUp.available .subscribe(() => {

NullInjectorError: No provider for SwUpdate! SwUpdate does not work Angular 5

吃可爱长大的小学妹 提交于 2019-12-05 09:43:38
Now I know there are a million posts about No Provider for such and such service, I know it needs to go in the providers please read my entire post. Basically I am trying to use SwUpdate to check to see if there is an update if so, refresh the browser: import { SwUpdate } from '@angular/service-worker'; ... export class ... constructor( private _swUp: SwUpdate ){} ngOnInit() { this.checkForUpdate(); } checkForUpdate() { if (this._swUp.isEnabled) { this._swUp.available .subscribe(() => { window.location.reload(); }); } } now I have registered my serviceworker: import { ServiceWorkerModule }