Aurelia 2 and current active route

I’m migrating a larger Aurelia 1 application and I have trouble getting the active route in components.

I’m using the aurelia/router and I’m following the example in Router Recipes - The Aurelia 2 Docs

I’m doing this in attached and if i delay the check for a few milliseconds it works, so it looks like it’s a timing issue. Should’t the router be ready in attached or is there a later component lifecycle step I could use?

1 Like