mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 23:01:57 +08:00
chore(platform): move exitApp within deviceready
This commit is contained in:
@ -175,7 +175,7 @@ Platform.register({
|
||||
doc.addEventListener('deviceready', function() {
|
||||
// 3) cordova deviceready event triggered
|
||||
|
||||
// add cordova listeners to fire platform events
|
||||
// add cordova listeners to emit platform events
|
||||
doc.addEventListener('backbutton', function() {
|
||||
p.backButton.emit(null);
|
||||
});
|
||||
@ -186,17 +186,17 @@ Platform.register({
|
||||
p.resume.emit(null);
|
||||
});
|
||||
|
||||
// cordova has its own exitApp method
|
||||
p.exitApp = function() {
|
||||
win.navigator.app.exitApp();
|
||||
};
|
||||
|
||||
// cordova has fully loaded and we've added listeners
|
||||
p.triggerReady();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// cordova has its own exitApp method
|
||||
p.exitApp = function() {
|
||||
win.navigator.app.exitApp();
|
||||
};
|
||||
|
||||
},
|
||||
isMatch(): boolean {
|
||||
return !!(win.cordova || win.PhoneGap || win.phonegap);
|
||||
|
Reference in New Issue
Block a user