# How to nav.push outside an ion-tabs?

**URL:** <https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860>\
**Category:** ionic-v3\
**Created:** [January 9, 2016, 4:38pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860 "2016-01-09T16:38:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [January 9, 2016, 4:38pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/1 "2016-01-09T16:38:40Z")

</div>

Hi,

Here my situation:

I have a Tabs page where one tab has a list of items. When clicking on one item, I want to get out from the Tabs page and go to the new Page and still keep the navigation history. Right now, the new Page is displayed inside the Tab where I click the item.

Any suggestion?

Here a code summary of what I have. you will see that I have a ion-navbar in the Tabs.html. The reason is I have other pages before showing the Tabs.html and I want to be able to go back to previous page. That’s the only solution that I found so far.

Tabs.html

```
<ion-navbar>
  ...
</ion-navbar>

<ion-content>
  <ion-tabs>
    <ion-tab [root]="tab1"></ion-tab>
  </ion-tabs>
</ion-content>

```

Tab1.html

```
<ion-content>
  <ion-list>
    <button ion-item *ngFor="#item of items" (click)="itemClicked(item)">
      {{item.id}}
    </button>
  </ion-list>
</ion-content>

```

Tab1.ts

```
itemClicked(item) {
  this.nav.push(Page1);
}
```

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [January 15, 2016, 12:14am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/2 "2016-01-15T00:14:25Z")

</div>

Nobody experience that kind of situation and found a solution?

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [January 28, 2016, 12:41am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/3 "2016-01-28T00:41:00Z")

</div>

The issue seems to be only on the Chrome iPhone “emulator”.

I am using Chrome to simulate it and does not get the issue on the Google Nexus “emulator”.

I also tried on a real BB10 phone and the interface used is the iphone and see the same issue.

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [February 5, 2016, 10:49pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/4 "2016-02-05T22:49:05Z")

</div>

Did somebody tried it on a real iPhone to see if it is a Chrome behavior only or not?

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [March 2, 2016, 2:44pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/5 "2016-03-02T14:44:32Z")

</div>

Here some screenshots

iOS: you can see at the bottom I have 2 tab bars. The one from the main window and the one from the new Page containing another tab bar.

![image](https://global.discourse-cdn.com/ionicframework/original/3X/6/7/67aa5465d59b78ead6406e959c331823c147ec5f.png)

Android version

![image](https://global.discourse-cdn.com/ionicframework/original/3X/c/0/c0ca5fe66604e432a04b6bd99ac6fc9686df365c.png)

---

<div class="post-metadata">

**Author:** ![raymondativie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/raymondativie/32/90670_2.png) [@raymondativie](https://forum.ionicframework.com/u/raymondativie)\
**Post date:** [March 16, 2016, 8:04am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/6 "2016-03-16T08:04:41Z")

</div>

I have this same issue… but the opposite is my case.  
I want the page to open inside the tab.

It opens inside the tab on the chrome iOS emulator, but opens outside the tab on the android

---

<div class="post-metadata">

**Author:** ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://forum.ionicframework.com/u/jack2)\
**Post date:** [March 16, 2016, 4:20pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/7 "2016-03-16T16:20:29Z")

</div>

I’m also running into this issue.

---

<div class="post-metadata">

**Author:** ![tleguijt](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@tleguijt](https://forum.ionicframework.com/u/tleguijt)\
**Post date:** [March 29, 2016, 10:57am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/8 "2016-03-29T10:57:49Z")

</div>

+1  
running into the same issue

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [April 5, 2016, 9:10pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/9 "2016-04-05T21:10:13Z")

</div>

So you need to grab the parent `nav` in order to push outside of the tabs. Using the [conference app](https://github.com/driftyco/ionic-conference-app) as an example, in `app.js` (`*.ts` if you’re using typescript), to open a page from the side menu we use:

```auto
let nav = this.app.getComponent('nav');

nav.setRoot(page.component);

```

_some of the code was removed for the example_

So in `schedule.js` you could call `goToTutorial()` on a button click in order to navigate to the `TutorialPage`:

```auto
static get parameters() {
  return [[IonicApp], [NavController], [ConferenceData], [UserData]];
}

constructor(app, nav, confData, user) {
  // all of the constructor code
}

goToTutorial() {
  let nav = this.app.getComponent('nav');

  nav.push(TutorialPage);
}

```

or you can use `nav.setRoot` to get rid of the history. Let me know if any of that isn’t clear! 😄

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [April 5, 2016, 10:41pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/10 "2016-04-05T22:41:54Z")

</div>

Hi @brandyshea,

Working like a charm! Thanks!

Would you mind to explain my what is the use of

```
 static get parameters() {
  return [[IonicApp], [NavController], [ConferenceData], [UserData]];
}
```

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [April 5, 2016, 10:53pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/11 "2016-04-05T22:53:47Z")

</div>

We should probably add this to the FAQ as well, but this is only if you’re using JavaScript and not Typescript:

> Angular2 is written in TypeScript, and normally depends on types to know what kind of objects to inject into class constructors as part of its dependency injection framework. Since these examples are in JavaScript and not TypeScript, we need a way to tell Angular what “types” of objects should be injected, without actually using types. The way we do this is with the static getter parameters which attaches this type information to the class.

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [April 5, 2016, 11:11pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/12 "2016-04-05T23:11:31Z")

</div>

Ok, understood.

By the way, the forum should have a way to tell the topic has been solved with a solution. Unless I did not see the way to do it?

---

<div class="post-metadata">

**Author:** ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://forum.ionicframework.com/u/jack2)\
**Post date:** [April 8, 2016, 2:29am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/13 "2016-04-08T02:29:53Z")

</div>

> [@icarus\_31](#):
>
> By the way, the forum should have a way to tell the topic has been solved with a solution. Unless I did not see the way to do it?

edit the title to begin with [SOLVED] ?

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [April 8, 2016, 4:20pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/14 "2016-04-08T16:20:41Z")

</div>

I know, but I don’t see the pen that allow me to edit it! You know how to get it back?

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/7/8/7889c7e475a541fd0c7ff7f0884d650b3efb7c71.png)

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [April 8, 2016, 6:51pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/15 "2016-04-08T18:51:07Z")

</div>

It actually wasn’t enabled, but I just enabled it. You can now click on the checkmark ![image](https://global.discourse-cdn.com/ionicframework/original/3X/b/0/b01c237f88a2fb604ee220dd79692b0c0a12cc9b.png) on a reply to select it as the solution.

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [April 20, 2016, 11:38pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/16 "2016-04-20T23:38:33Z")

</div>

Hi @brandyshea,

I just upgraded to beta 5 and the issue occurs when coming back from the Tab page.

I have this error on the console:

EXCEPTION: TypeError: this.parent.unregisterChildNav is not a function

Any clue?

Thanks

---

<div class="post-metadata">

**Author:** ![unvadim](https://avatars.discourse-cdn.com/v4/letter/u/d78d45/32.png) [@unvadim](https://forum.ionicframework.com/u/unvadim)\
**Post date:** [April 22, 2016, 10:29am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/17 "2016-04-22T10:29:52Z")

</div>

To get new Page to open within the Tab contents on Android Chrome emulator I had to do edit @App config:

```
config: {      
    tabSubPages:false
}

```

p.s. using beta.6

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [April 22, 2016, 2:58pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/18 "2016-04-22T14:58:09Z")

</div>

hey @icarus_31, that should be fixed in `beta.6` by this issue (it was a quick release):

> <https://github.com/ionic-team/ionic/issues/6267>

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [April 22, 2016, 7:54pm UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/19 "2016-04-22T19:54:25Z")

</div>

Yes, I saw that. I did not expect to get the beta 6 that soon! 🙂  
thanks

---

<div class="post-metadata">

**Author:** ![icarus\_31](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/icarus_31/32/94713_2.png) [@icarus\_31](https://forum.ionicframework.com/u/icarus_31)\
**Post date:** [May 26, 2016, 12:30am UTC](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/20 "2016-05-26T00:30:17Z")

</div>

Hi @brandyshea,

How would you replace the suggested code that you gave my last time? The getComponent is no more available with beta 7 ☹

Thanks in advance

[Next page](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860.md?page=2)
