This repository was archived by the owner on Dec 4, 2017. It is now read-only.
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
[Router]Feedback on documentation #1808
Closed
Description
As I'm working through the current "Routing & Navigation" chapter, I have the following questions/issues:
- When discussing the baseRef, the document states: "If the app folder is the application root, ..." What if it is not? And what if it is different from development to production? Is there a way to define this so it can be easily changed as part of the production build process?
- The documentation states "We must register router providers in bootstrap." It would be helpful for the documentation to explain why.
- The section on redirecting routes says "We can arrange for that behavior in several ways." Then it proceeds to only show one way. What are some other ways?
- Missing word(s): "The router supports multiple named outlets, a feature we'll cover in future."
- The router configuration constant name is camelCase here:
export const routes: RouterConfig
But PascalCase here:
export const HeroesRoutes: RouterConfig
- The routes variable when updated to merge the heroes routes should also be typed:
export const routes = [ ...HeroesRoutes, { path: 'crisis-center', component: CrisisListComponent } ];
- Consider showing the required imports for the code shown in Milestone Switch license to Apache 2 #2 here: "app/heroes/hero-list.component.ts (Constructor)"
- Consider showing the required imports for the code shown in Milestone Switch license to Apache 2 #2 here: "app/heroes/hero-detail.component.ts (Constructor)"
- Typo: "The router checks the
CanDeactive
guards first," should beCanDeactivate
. - This code mentions that these properties are good to know about, but then does not provide any information on what they are:
// Not using but worth knowing about
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot
)
- Since the
DialogService
is required to run the application being built in this chapter, consider including it in the tabbed code result at the end of Milestone Change link on the homepage to point to the ng-conf playlist #3. - This is more of an implementation question, so may not go here ... but why is getting a route parameter:
this.route.params.subscribe
But getting a route query parameter:
this.router.routerState.queryParams.subscribe
Seems for discoverability that these should come from a similar root? Consider detailing why this is so in the documentation?
Metadata
Metadata
Assignees
Labels
No labels