How to get active nav from app.component.ts ( ionic 6)

let view = this.nav.getActive();
let page = view ? this.nav.getActive().instance : null;

Above ionic 3 code . Anyone know what is replacement code in ionic 6?

1 Like