From dbf01e4fc550f4dfd461679650d2cbba714822e4 Mon Sep 17 00:00:00 2001 From: gofnnp Date: Thu, 12 Jan 2023 02:38:24 +0400 Subject: [PATCH] =?UTF-8?q?dev=20#13538=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- angular/src/app/directives/download-app.directive.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/angular/src/app/directives/download-app.directive.ts b/angular/src/app/directives/download-app.directive.ts index febb769..b0b35a1 100644 --- a/angular/src/app/directives/download-app.directive.ts +++ b/angular/src/app/directives/download-app.directive.ts @@ -13,18 +13,18 @@ export class DownloadAppDirective implements OnInit { public renderer: Renderer2, private el: ElementRef ) { - renderer.listen('window', 'beforeinstallprompt', (e) => { + this.renderer.listen('window', 'beforeinstallprompt', (e) => { e.preventDefault(); + console.log('#: ', e); this.deferredPrompt = e; }); - renderer.listen('window', 'appinstalled', (evt) => { + this.renderer.listen('window', 'appinstalled', (evt) => { console.log('INSTALLED!!!'); }); } ngOnInit(): void { this.getTypeDevice(); - console.log('#'); if (!((this.deviceType == 'android' && this.deferredPrompt) || this.deviceType == 'ios')) { console.log(this.deviceType);