diff --git a/angular/src/app/directives/download-app.directive.ts b/angular/src/app/directives/download-app.directive.ts index 7364900..2b3beee 100644 --- a/angular/src/app/directives/download-app.directive.ts +++ b/angular/src/app/directives/download-app.directive.ts @@ -25,23 +25,23 @@ export class DownloadAppDirective implements OnInit { console.log('#: ', e); this.deferredPrompt = e; - this.getTypeDevice(); - - if ( - !( - (this.deviceType == 'android' && this.deferredPrompt) || - this.deviceType == 'ios' - ) - ) { - console.log(this.deviceType); - console.log(this.deferredPrompt); - - this.el.nativeElement.style.display = 'none'; - } }); this.renderer.listen('window', 'appinstalled', (evt) => { console.log('INSTALLED!!!'); }); + this.getTypeDevice(); + + if ( + !( + (this.deviceType == 'android' && this.deferredPrompt) || + this.deviceType == 'ios' + ) + ) { + console.log(this.deviceType); + console.log(this.deferredPrompt); + + this.el.nativeElement.style.display = 'none'; + } }, 0) }