diff --git a/angular/src/app/directives/download-app.directive.ts b/angular/src/app/directives/download-app.directive.ts index 2eaf8a1..0b4ebbf 100644 --- a/angular/src/app/directives/download-app.directive.ts +++ b/angular/src/app/directives/download-app.directive.ts @@ -53,6 +53,9 @@ export class DownloadAppDirective implements OnInit { console.log(e); e.preventDefault(); this.deferredPrompt = e; + if (this.deferredPrompt) { + this.el.nativeElement.style.display = 'block'; + } } @HostListener('window:appinstalled', ['$event']) @@ -62,9 +65,6 @@ export class DownloadAppDirective implements OnInit { e.preventDefault(); // Stash the event so it can be triggered later. this.deferredPrompt = e; - if (this.deferredPrompt) { - this.el.nativeElement.style.display = 'block'; - } }