Removing views from the navigations stack back button issues

Assuming this flow:

ClientDetailPage > AddClentPage > AddLocationPage > Back to ClientDetailPage

From AddLocationPage

    this.navCtrl.push('ClientDetailPage', params) // push in new page, increments view index
      .then(() => {
        /*Set the index back 2 pages but remove 3 because we don't want 
        ClientDetailPage on the stack twice (because we have added it above).*/
        this.navCtrl.remove(this.viewCtrl.index - 2, 3); 
    });

Hope it saves you some time :slight_smile:

3 Likes