Push , insert insertPages


#1

Hi,

I have components with following navigation using push:

{search_results_page} --> {product_detail_page}

I want to how ever change that to
{search_results_page} --> [{search_results_page_SILENT} -> {product_detail_page}]

Note: {search_results_page_SILENT} is another view like {search_results_page} but with special parameters.

Thus the behavior I seek is going back from {product_detail_page} will lead to {search_results_page_SILENT}, and subsequent back will pop to {search_results_page}

I have tried push 2 times, insert and insertPages, but all being ignored? is there are a way to do this at all or is it bug with the framework???


#2

sorry i think i have done it…
I had something like this…(sure there are better ways no doubt)

let currentView = this.navCtrl.getByIndex(this.navCtrl.length()-1);
this.navCtrl.insertPages(this.navCtrl.length(), [{page:currentView, params: {k: k, m: m}}, { page: ProductPage, params: {k: k, m: m} } ]);

but now I have:
let currentView = this.navCtrl.getByIndex(this.navCtrl.length()-1);
this.navCtrl.insertPages(this.navCtrl.length(), [{page:currentView.component, params: {k: k, m: m}}, { page: ProductPage, params: {k: k, m: m} } ]);

note: currentView.component rather than currentView