Navigating from an Overlay Component inside a child Nav

Hi! I need help with a complex navigation in my app.

I have a 2 level ion-nav structure (an ion-nav inside and ion-nav) and from the children I open a modal. When clossing I want to setRoot() to certain page inside the children nav. Ex.

Page 1
Page 2 (root) - A - B - C - Modal

I want to go from Modal -> Page 1 and set that as root

Reading the documentation I saw the “Navigating from an Overlay Component” here where it makes something like: `constructor(
public viewCtrl: ViewController
public appCtrl: App
) {}

pushPage() {

However getRootNav() will take the parent ion-nav and wont do the transition correctly, I managed to fix my problem by doing:


But I feel that is such a dirty solution and kinda hardcoded, can I get a suggestion for this scenario?