Skip to content
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
@DeborahK

Description

@DeborahK

As I'm working through the current "Routing & Navigation" chapter, I have the following questions/issues:

  1. 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?
  2. The documentation states "We must register router providers in bootstrap." It would be helpful for the documentation to explain why.
  3. 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?
  4. Missing word(s): "The router supports multiple named outlets, a feature we'll cover in future."
  5. The router configuration constant name is camelCase here:
    export const routes: RouterConfig
    But PascalCase here:
    export const HeroesRoutes: RouterConfig
  6. The routes variable when updated to merge the heroes routes should also be typed:
    export const routes = [ ...HeroesRoutes, { path: 'crisis-center', component: CrisisListComponent } ];
  7. 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)"
  8. 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)"
  9. Typo: "The router checks the CanDeactive guards first," should be CanDeactivate.
  10. 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
  )
  1. 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.
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions