# Create Logout tab that on click pops back to the root

**URL:** <https://forum.ionicframework.com/t/create-logout-tab-that-on-click-pops-back-to-the-root/64148>\
**Category:** ionic-v3\
**Created:** [September 21, 2016, 8:54pm UTC](https://forum.ionicframework.com/t/create-logout-tab-that-on-click-pops-back-to-the-root/64148 "2016-09-21T20:54:47Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![fishgrind](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/fishgrind/32/103232_2.png) [@fishgrind](https://forum.ionicframework.com/u/fishgrind)\
**Post date:** [September 22, 2016, 8:05pm UTC](https://forum.ionicframework.com/t/create-logout-tab-that-on-click-pops-back-to-the-root/64148/7 "2016-09-22T20:05:41Z")

</div>

@rapropos you are right!

`@ViewChild(Nav) nav: Nav;`

> [@How to nav.push outside an ion-tabs?](https://forum.ionicframework.com/t/how-to-nav-push-outside-an-ion-tabs/40860/21):
>
> The code has been updated in the conference app to use ViewChild. Here it is for app.js: [https://github.com/driftyco/ionic-conference-app/blob/master/app/app.js#L24-L26](https://github.com/driftyco/ionic-conference-app/blob/master/app/app.js#L24-L26) and in TypeScript: Let me know if that’s not what you meant. slight_smile

---

_[View the full topic](https://forum.ionicframework.com/t/create-logout-tab-that-on-click-pops-back-to-the-root/64148)._
