правка
This commit is contained in:
gofnnp 2023-01-12 19:22:10 +04:00
parent 7a895c76a6
commit 85174c1fab

View File

@ -19,6 +19,7 @@ export class DownloadAppDirective implements OnInit {
public renderer: Renderer2, public renderer: Renderer2,
private el: ElementRef private el: ElementRef
) { ) {
setTimeout(() => {
this.renderer.listen('window', 'beforeinstallprompt', (e) => { this.renderer.listen('window', 'beforeinstallprompt', (e) => {
e.preventDefault(); e.preventDefault();
console.log('#: ', e); console.log('#: ', e);
@ -41,6 +42,7 @@ export class DownloadAppDirective implements OnInit {
this.renderer.listen('window', 'appinstalled', (evt) => { this.renderer.listen('window', 'appinstalled', (evt) => {
console.log('INSTALLED!!!'); console.log('INSTALLED!!!');
}); });
}, 0)
} }
ngOnInit(): void {} ngOnInit(): void {}