mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
2
core/src/components.d.ts
vendored
2
core/src/components.d.ts
vendored
@ -3620,7 +3620,7 @@ export namespace Components {
|
||||
/**
|
||||
* Go back to previous page in the window.history.
|
||||
*/
|
||||
'goBack': () => Promise<void>;
|
||||
'back': () => Promise<void>;
|
||||
'navChanged': (direction: RouterDirection) => Promise<boolean>;
|
||||
'printDebug': () => void;
|
||||
/**
|
||||
|
||||
@ -69,7 +69,7 @@ If you're using Angular, please see [ion-router-outlet](../router-outlet) instea
|
||||
|
||||
## Methods
|
||||
|
||||
### `goBack() => Promise<void>`
|
||||
### `back() => Promise<void>`
|
||||
|
||||
Go back to previous page in the window.history.
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ export class Router implements ComponentInterface {
|
||||
|
||||
@Listen('document:ionBackButton')
|
||||
protected onBackButton(ev: BackButtonEvent) {
|
||||
ev.detail.register(0, () => this.goBack());
|
||||
ev.detail.register(0, () => this.back());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,7 +105,7 @@ export class Router implements ComponentInterface {
|
||||
* Go back to previous page in the window.history.
|
||||
*/
|
||||
@Method()
|
||||
goBack() {
|
||||
back() {
|
||||
this.win.history.back();
|
||||
return Promise.resolve(this.waitPromise);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user