I’m working on an ionic application and I want to show a ‘skip button’ in the nav bar of a page when the user comes from the sign up page , here is the portion of code i used for that :
<ion-header>
<ion-navbar >
<ion-title> <p >Profile</p></ion-title>
<ion-buttons right>
<button *ngIf="show()" (click)="gotohome()" ion-button > SKIP
</button>
</ion-buttons>
</ion-navbar>
</ion-header>
and here is the ‘show()’ function
show() : boolean {
if(this.navCtrl.getPrevious().name == 'Signup4Page') {
return true;
}
else {
return false;
}
}
When building the app, the button shows normally , but when generating the apk file, it doesn’t work.
I couldn’t figure out where the problem is. Is there something i’m missing ?
Thanks for your help.