2017-04-19 53 views
0

我在我的离子2页脚有一个按钮。它推动滑动确定,但不是弹出和后退过渡。它消失然后再现并且看起来不太好。我如何才能让它像前向转换那样滑动?导航控制器弹出。工具栏按钮消失,然后重新出现方向倒退。离子2

<ion-footer class="has-back-btn"> 
<ion-toolbar class="no-padding transparent"> 
<ion-buttons start>  
<button class="back-btn" tappable (click)="goBack()" ion-button icon-left> 
<i class="fa fa-chevron-left " aria-hidden="true"></i> Back 
</button> 
</ion-buttons> 
</ion-toolbar> 
</ion-footer> 
enter code here 

goBack() { 

    var navOptions = { 
     animation: 'ios-transition', 
     direction: back, 
     animate: true, 
    }; 

    if(this.isModal == true){ 
     this.navCtrl.pop(); 
    }else{ 
    this.navCtrl.pop(navOptions); 
    } 
} 

enter image description here

+0

请分享一些截图。 –

+0

我已经更新了屏幕截图。 –

回答

0

为什么不ü用这个

<button ion-button navPop>Go Back</button> 

像例如here

+0

感谢您指出这一点,但它仍然具有相同的效果。 –