# Accessing Child Route currentInstruction

**URL:** <https://discourse.aurelia.io/t/accessing-child-route-currentinstruction/2566>\
**Category:** Framework Knowledge\
**Created:** [May 17, 2019, 3:33pm UTC](https://discourse.aurelia.io/t/accessing-child-route-currentinstruction/2566 "2019-05-17T15:33:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkever](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/rkever/32/145_2.png) [@rkever](https://discourse.aurelia.io/u/rkever)\
**Post date:** [May 17, 2019, 3:33pm UTC](https://discourse.aurelia.io/t/accessing-child-route-currentinstruction/2566/1 "2019-05-17T15:33:29Z")

</div>

I’ve had quite a time trying to work with child routes and accessing the currentInstruction object so that I can navigate properly to other child routes. The problem is coming from the fact that I’m injecting the router into the class e.g. `import { Router } from 'aurelia-router';`. In that view model I’m wanting to navigate to another child route but and was trying to use this.router.navigateToRoute and then trying to grab the `this.router.currentNavigation` but is always null. I finally fingured out that you need to grab the router object from the route components activate lifecycle method which has the actual current child router object.

I thought I’d share this for anyone having similar issues.

```auto
export class MyViewModel {
    activate(params, routeConfig, navigationInstruction){
        this.navigationInstruction = navigationInstruction;
    }

    someMethod(){
        this.navigationInstruction.router.navigateToRoute( this.navigationInstruction.config.name );
    }
}

```

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [May 17, 2019, 3:51pm UTC](https://discourse.aurelia.io/t/accessing-child-route-currentinstruction/2566/2 "2019-05-17T15:51:00Z")

</div>

Nice sharing. I think this is an unfortunate state with current router doc, as it doesn’t signify that application routers are like a tree. A router cannot see what route is available inside other branches that is not connected to it in anyway.

In combination with that is `navigateToRoute` expecting a name, making the above limitation worse because that’s the combo that normally cost folks the most time trying to figure out.
