Router Documentation Improvement
I'm submitting a documentation improvement
First of, if this is not the right place for docs related stuff please redirect me to the correct one, thanks.
I'm new to Aurelia and created a little app with nested routes while reading the docs.
In a nested route I wanted to access the router to use router.navigateToRoute
However that route did not specify any routes of their own, but I still copy and pasted the configRouter() function to look like this to get access to the router:
import {RouterConfiguration, Router} from 'aurelia-router';
export class LeafRouteModule{
router: Router;
configureRouter(config: RouterConfiguration, router: Router): void {
this.router = router;
}
}
However with this additional code my route would suddenly fail, I could set a breakpoint inside of it and see that I indeed get the router but somewhere down the line it bails out(Route not found).
When I removed the configureRouter() function everything worked again.
Idk if this is a bug or intended behaviour.
So to get access to the router and make the route work again I had to inject it. It would be nice if this is addressed in the docs. Also if there is any difference between injecting the router and using the configureRouter function to setup the router.
I really like the framework, keep up the good work.
Issue moved to aurelia/router #412 via ZenHub