mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
fix(angular): correct subscription to cordova ready event (#14577)
This commit is contained in:

committed by
Manu MA

parent
aaf3eee59d
commit
5967352a32
@ -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 {
|
||||||
|
Reference in New Issue
Block a user