правка
This commit is contained in:
gofnnp 2023-01-13 03:05:50 +04:00
parent c71e2d4c48
commit e4bb1d8947

View File

@ -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';
}
}