# Beta 8 - how to use nav in root component @ViewChild (JS)

**URL:** <https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173>\
**Category:** ionic-v3\
**Created:** [June 8, 2016, 2:44am UTC](https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173 "2016-06-08T02:44:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjhartin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pjhartin/32/105437_2.png) [@pjhartin](https://forum.ionicframework.com/u/pjhartin)\
**Post date:** [June 8, 2016, 2:44am UTC](https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173/1 "2016-06-08T02:44:33Z")

</div>

Currently updated my latest project to Beta 8 before shipping but ran into small issue. I can’t seem to figure out how to use the navController in the root component. I understand the reasons why it cant be injected, but it seems the docs are in TS ([http://ionicframework.com/docs/v2/components/#navigation](http://ionicframework.com/docs/v2/components/#navigation)), and my project is in JS, and I can’t figure out how, or where to place the new code.

Beta 7, I did the following:

```
@App({
    templateUrl: 'build/app.html',
    providers: [APIRestInterface, etc...]
    queries: {
        nav: new ViewChild('content')
    }
})

```

I’m not sure how to do this since the config/bootstrapping methods have changed.

---

<div class="post-metadata">

**Author:** ![pjhartin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pjhartin/32/105437_2.png) [@pjhartin](https://forum.ionicframework.com/u/pjhartin)\
**Post date:** [June 8, 2016, 3:01am UTC](https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173/2 "2016-06-08T03:01:45Z")

</div>

Actually, never mind. I noticed that the ionic-conference app had been updated to Beta 8, and it’s clear that the queries remain part of the component

> <https://github.com/ionic-team/ionic-conference-app/commit/d80cc558e02a91ac29de3b2b9960565fa5e8cb60>

i.e. In my case:

```
@Component({
    templateUrl: 'build/app.html',
    queries: {
        nav: new ViewChild('content')
    }
})

```

All is well!

---

<div class="post-metadata">

**Author:** ![arsene123](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/arsene123/32/102588_2.png) [@arsene123](https://forum.ionicframework.com/u/arsene123)\
**Post date:** [June 8, 2016, 3:07am UTC](https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173/3 "2016-06-08T03:07:31Z")

</div>

@App change to @Component, chech the link of @pjhartin

---

<div class="post-metadata">

**Author:** ![pjhartin](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pjhartin/32/105437_2.png) [@pjhartin](https://forum.ionicframework.com/u/pjhartin)\
**Post date:** [June 8, 2016, 3:10am UTC](https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173/4 "2016-06-08T03:10:15Z")

</div>

@arsene123 It was actually myself that replied to my own message, but thanks anyway. The issue wasn’t @App/@Component. It was that I was unsure where the assignment of nav would take place in a non-TS project.

---

<div class="post-metadata">

**Author:** ![arsene123](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/arsene123/32/102588_2.png) [@arsene123](https://forum.ionicframework.com/u/arsene123)\
**Post date:** [June 8, 2016, 3:16am UTC](https://forum.ionicframework.com/t/beta-8-how-to-use-nav-in-root-component-viewchild-js/54173/5 "2016-06-08T03:16:02Z")

</div>

@ pjhartin, ah ok. this is mentioned in the readme beta@8
