# How to navigate to route in v2

**URL:** <https://discourse.aurelia.io/t/how-to-navigate-to-route-in-v2/4945>\
**Category:** Uncategorized\
**Created:** [October 18, 2022, 9:25am UTC](https://discourse.aurelia.io/t/how-to-navigate-to-route-in-v2/4945 "2022-10-18T09:25:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aGustafson](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@aGustafson](https://discourse.aurelia.io/u/aGustafson)\
**Post date:** [October 18, 2022, 9:25am UTC](https://discourse.aurelia.io/t/how-to-navigate-to-route-in-v2/4945/1 "2022-10-18T09:25:06Z")

</div>

Hmm, I am having trouble navigating to a route programmatically.

I would like to call this.router.load() in my component.  
But when I inject IRouter into the component constructor, I cannot load the page that the component is on.  
Other services are injected fine.

The error is " ‘page-details’ did not match any configured route or registered component name -"

When I remove the component from the details page, or remove the IRouter from the constructor or the component, everything loads fine.

---

<div class="post-metadata">

**Author:** ![aGustafson](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@aGustafson](https://discourse.aurelia.io/u/aGustafson)\
**Post date:** [October 18, 2022, 11:06am UTC](https://discourse.aurelia.io/t/how-to-navigate-to-route-in-v2/4945/2 "2022-10-18T11:06:21Z")

</div>

ok, i figured it out.

My IDE was automatically generating the following import:

```auto
import {IRouter} from "aurelia";

```

when I changed that to the following everything worked as expected:

```auto
import { IRouter } from '@aurelia/router';

```

---

<div class="post-metadata">

**Author:** ![dwaynecharrington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/dwaynecharrington/32/11_2.png) [@dwaynecharrington](https://discourse.aurelia.io/u/dwaynecharrington)\
**Post date:** [January 16, 2023, 12:06am UTC](https://discourse.aurelia.io/t/how-to-navigate-to-route-in-v2/4945/3 "2023-01-16T00:06:22Z")

</div>


