refactor(nav): transitions

This commit is contained in:
Manu Mtz.-Almeida
2018-03-20 14:12:16 +01:00
parent c85f7483c9
commit f16a9672b4
20 changed files with 484 additions and 869 deletions

View File

@ -7,7 +7,7 @@
display: none;
}
.back-button.can-back-back,
.can-go-back > ion-header .back-button,
.back-button.show-back-button {
display: inline-block;
}

View File

@ -35,15 +35,6 @@ export class BackButton {
@Element() el: HTMLElement;
hostData() {
return {
class: {
'show-back-button': !!this.defaultHref
}
};
}
private onClick(ev: Event) {
const nav = this.el.closest('ion-nav');
if (nav && nav.canGoBack()) {
@ -54,6 +45,14 @@ export class BackButton {
}
}
hostData() {
return {
class: {
'show-back-button': !!this.defaultHref
}
};
}
render() {
const backButtonIcon = this.icon || this.config.get('backButtonIcon', 'arrow-back');
const backButtonText = this.text || this.config.get('backButtonText', this.mode === 'ios' ? 'Back' : '');