mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
fix(angular): NavController methods return a promise (#17106)
fixes #17103
This commit is contained in:
@ -44,19 +44,19 @@ export class NavController {
|
|||||||
platform.backButton.subscribeWithPriority(0, () => this.goBack());
|
platform.backButton.subscribeWithPriority(0, () => this.goBack());
|
||||||
}
|
}
|
||||||
|
|
||||||
navigateForward(url: string | UrlTree | any[], options: NavigationOptions = {}) {
|
navigateForward(url: string | UrlTree | any[], options: NavigationOptions = {}): Promise<boolean> {
|
||||||
this.setDirection('forward', options.animated, options.animationDirection);
|
this.setDirection('forward', options.animated, options.animationDirection);
|
||||||
this.navigate(url, options);
|
return this.navigate(url, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
navigateBack(url: string | UrlTree | any[], options: NavigationOptions = {}) {
|
navigateBack(url: string | UrlTree | any[], options: NavigationOptions = {}): Promise<boolean> {
|
||||||
this.setDirection('back', options.animated, options.animationDirection);
|
this.setDirection('back', options.animated, options.animationDirection);
|
||||||
this.navigate(url, options);
|
return this.navigate(url, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
navigateRoot(url: string | UrlTree | any[], options: NavigationOptions = {}) {
|
navigateRoot(url: string | UrlTree | any[], options: NavigationOptions = {}): Promise<boolean> {
|
||||||
this.setDirection('root', options.animated, options.animationDirection);
|
this.setDirection('root', options.animated, options.animationDirection);
|
||||||
this.navigate(url, options);
|
return this.navigate(url, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
navigate(url: string | UrlTree | any[], options: NavigationOptions) {
|
navigate(url: string | UrlTree | any[], options: NavigationOptions) {
|
||||||
|
Reference in New Issue
Block a user