fix(angular): correct subscription to cordova ready event (#14577)

This commit is contained in:
Adrián de la Rosa
2018-06-05 17:44:55 +02:00
committed by Manu MA
parent aaf3eee59d
commit 5967352a32

View File

@ -45,7 +45,7 @@ export class Platform {
let readyResolve: (value: string) => void; let readyResolve: (value: string) => void;
this._readyPromise = new Promise(res => { readyResolve = res; } ); this._readyPromise = new Promise(res => { readyResolve = res; } );
if ((window as any)['cordova']) { if ((window as any)['cordova']) {
window.addEventListener('deviceready', () => { document.addEventListener('deviceready', () => {
readyResolve('cordova'); readyResolve('cordova');
}, {once: true}); }, {once: true});
} else { } else {