fix(angular): NavController methods return a promise (#17106)

fixes #17103
This commit is contained in:
Manu MA
2019-01-14 22:16:23 +01:00
committed by GitHub
parent 564fd61541
commit 3aaf87ad0f

View File

@ -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) {