mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
Merge branch '2.0' of https://github.com/driftyco/ionic into 2.0
This commit is contained in:
@ -302,9 +302,7 @@ export class Platform {
|
||||
// called by engines (the browser)that do not provide them
|
||||
|
||||
/**
|
||||
* The `exitApp` method is useful when running from a native platform,
|
||||
* such as Cordova. This adds the ability to place the Cordova app
|
||||
* in the background.
|
||||
* @private
|
||||
*/
|
||||
exitApp() {}
|
||||
|
||||
@ -321,7 +319,7 @@ export class Platform {
|
||||
* app's back button within the navbar is clicked, but this event is only
|
||||
* referencing the platform's hardward back button.
|
||||
*/
|
||||
backButton: EventEmitter<any> = new EventEmitter();
|
||||
backButton: EventEmitter<Event> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* The pause event emits when the native platform puts the application
|
||||
@ -329,14 +327,14 @@ export class Platform {
|
||||
* application. This event would emit when a Cordova app is put into
|
||||
* the background, however, it would not fire on a standard web browser.
|
||||
*/
|
||||
pause: EventEmitter<any> = new EventEmitter();
|
||||
pause: EventEmitter<Event> = new EventEmitter();
|
||||
|
||||
/**
|
||||
* The resume event emits when the native platform pulls the application
|
||||
* out from the background. This event would emit when a Cordova app comes
|
||||
* out from the background, however, it would not fire on a standard web browser.
|
||||
*/
|
||||
resume: EventEmitter<any> = new EventEmitter();
|
||||
resume: EventEmitter<Event> = new EventEmitter();
|
||||
|
||||
|
||||
// Getter/Setter Methods
|
||||
|
@ -176,14 +176,14 @@ Platform.register({
|
||||
// 3) cordova deviceready event triggered
|
||||
|
||||
// add cordova listeners to emit platform events
|
||||
doc.addEventListener('backbutton', function() {
|
||||
p.backButton.emit(null);
|
||||
doc.addEventListener('backbutton', function(ev: Event) {
|
||||
p.backButton.emit(ev);
|
||||
});
|
||||
doc.addEventListener('pause', function() {
|
||||
p.pause.emit(null);
|
||||
doc.addEventListener('pause', function(ev: Event) {
|
||||
p.pause.emit(ev);
|
||||
});
|
||||
doc.addEventListener('resume', function() {
|
||||
p.resume.emit(null);
|
||||
doc.addEventListener('resume', function(ev: Event) {
|
||||
p.resume.emit(ev);
|
||||
});
|
||||
|
||||
// cordova has its own exitApp method
|
||||
|
Reference in New Issue
Block a user