This plugin is the original and fully featured Aurelia v2 router. It is a way to provide additional features for those who need or want it. It might later be added back into the core of Aurelia v2.
For the latest stable version:
npm i aurelia-direct-router
For our nightly builds:
npm i aurelia-direct-router@dev
Once the Aurelia Direct Router is installed, simply import
anything router related from aurelia-direct-router
instead of from aurelia
or @aurelia/router
. So, for example, in your main.js/ts
file
import Aurelia, { RouterConfiguration } from 'aurelia';
should be changed to
import Aurelia from 'aurelia';
import { RouterConfiguration } from 'aurelia-direct-router';
Note that while a lot of the API of the router shipping with Aurelia is a subset of the API of Aurelia Direct Router, there are some differences. Please consult the Aurelia Direct Router documentation for details.
You can read the documentation on the Aurelia Direct Router here. The documentation is still a work-in-progress, with new content added regularly.
The Aurelia Direct Router is MIT licensed. You can find out more and read the license document here.