Skip to content

Commit

Permalink
chore(platform): move exitApp within deviceready
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Apr 22, 2016
1 parent 532096b commit 95ee2bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ionic/platform/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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);
Expand Down

0 comments on commit 95ee2bb

Please sign in to comment.