I have an application that needs to guide the user step by step. While I am aware of using navpop
and navpush
for navigating between pages, I am unsure about how to use navpop
to go back to the first page.
Currently, I am attempting to pop()
twice if there are 3 pages:
//html
<button (click)="gotoAdopt()">
Back to Adopt
</button>
//component.ts
gotoAdopt(event){
// Pushing back to the initial page
this.navCtrl.pop();
this.navCtrl.pop();///<-- pop() again to return to the first page
}
However, I believe there might be a better solution than what I am currently doing.