How to setup routing with Aurelia v2

Hi all,

I cannot use router with Aurelia 2 like I used to do with Aurelia v1.

The documentation is only about <au-viewport></au-viewport> tag, but does not explain how to configure the routes.

Configuration like in v1 does not seem to work :configureRouter method is not called, and parameters types seem invalid : “‘RouterConfiguration’ refers to a value, but is being used as a type here”.

Any idea ?

Thanks.

1 Like

Routing in Aurelia 2 is very much still WIP. As a result, configuration isn’t in place yet. You can still use routing, though, as long as you stick to direct/conventional routing. Here’s some information on how.

Let me know if you have any questions, either here or on discord.

2 Likes

Hi,

Thanks for the link, it would be nice to have a section on the github page that lists the features available with the current version of Aurelia 2 (the one we get with the npx makes command). Features like routing, binding engine, http client, event aggregator, etc…

With regular updates (no hurry, Aurelia 1 is great) it would help to know what can be used and what cannot be used yet (=> less questions like mine…).

1 Like