Is there a way to return back to a certain point of the navigation stack?
I’ve tried using: NavController.setPage() with the result of the function:
nav.getViews().map(item=>{
return {
page: item.name,
params: item.data
}
});
but it seems the function require an object for the page attribute?
Or is there a way to create loop that pops() back untile that page is found?
EDIT:
the solution is:
export function getNavStack(nav:NavController): Array<AgxIonicNavStack> {
return nav.getViews().map(item=>{
return {
page: item.component, //item.name,
params: item.data
}
});
}