I am working on an application and I want to navigate back to the TabsPage and than the specific second tab of 4 tabs.
So what I tried based on other answers on stack is this:
export class ModalPage {
public tab: Tabs;
constructor(public navCtrl: NavController, private viewCtrl: ViewController, public params: NavParams) {
this.tab = this.navCtrl.parent;
}
submit(score, comment){
let currentIndex = this.slides.getActiveIndex();
if(currentIndex === this.allExercises.length - 1){
this.tab.select(1);
}
But this throws me this error: ERROR TypeError: Cannot read property 'select' of null
How can I navigate within that if statement
to the TabsPage with the second tab as active? Maybe there is an other way of achieving this.