mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
committed by
Manu MA
parent
a9247ce0e9
commit
509cfd54aa
@@ -1,5 +1,4 @@
|
||||
import { Directive, ElementRef, HostListener, Input, Optional } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { NavController } from '../../providers/nav-controller';
|
||||
import { IonRouterOutlet } from './ion-router-outlet';
|
||||
|
||||
@@ -17,7 +16,6 @@ export class IonBackButtonDelegate {
|
||||
}
|
||||
|
||||
constructor(
|
||||
@Optional() private router: Router,
|
||||
@Optional() private routerOutlet: IonRouterOutlet,
|
||||
private navCtrl: NavController,
|
||||
private elementRef: ElementRef,
|
||||
@@ -28,7 +26,7 @@ export class IonBackButtonDelegate {
|
||||
if (this.routerOutlet && this.routerOutlet.canGoBack()) {
|
||||
this.routerOutlet.pop();
|
||||
ev.preventDefault();
|
||||
} else if (this.router && this.defaultHref != null) {
|
||||
} else if (this.defaultHref != null) {
|
||||
this.navCtrl.navigateBack(this.defaultHref);
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ export class RouterLinkDelegate {
|
||||
@Input() routerDirection: NavDirection = 'forward';
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private locationStrategy: LocationStrategy,
|
||||
private navCtrl: NavController,
|
||||
private elementRef: ElementRef,
|
||||
private router: Router,
|
||||
@Optional() private routerLink?: RouterLink,
|
||||
) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user