How to navigate to route in v2

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.

ok, i figured it out.

My IDE was automatically generating the following import:

import {IRouter} from "aurelia";

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

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