Tab to page In ionic 3

Hi,

I am new to Ionic and i am stuck in a issue I want open a new view from the tab page. The new view is opening in the same the tab. I want to use push for the navigation as well i tried using

let nav = this.app.getComponent(‘nav’);
nav.push(TutorialPage);

But in Ionic 3 .getComponent(‘nav’); has been removed. Any alternative would be helpful.

Thanks in advance.

What exactly do you want to achieve? Do you want to add another page(tab) to the tabbed menu?

I’ve wrote a similar answer for this question just ignore the parameters at the end.

Note: This example shows how you can preselect your tabs if you only want to push from a site to a different one use this code:

this.navCtrl.push(YourPage);

Actually i want to push it to a different page outside the tab…but that page is opening it in the same tab with the tabs.

Can you please illustrate what you’re trying to do with some sample code? I think it will be easier to know what you’re trying to do and how to go about helping you too

Its happening like this

ce3c1ceefeac3874238f9d79e0c0ac12525df5cc_1_690x436

But i want to do it like this…

1

I want to nav.push it outside the on-tabs

This worked for me…!!!
Thanks!!

import { Component} from ‘@angular/core’;
import { App } from ‘ionic-angular’;

@Component({
templateUrl: ‘lists.html’,
})
export class ListsTab {

constructor(private app: App) {
}

goToSingle(listId:number) {
this.app.getRootNav().push(SinglePage, {listId: listId});
}

}

Ok great, glad it worked.