Skip to content

Angular Router tutorial Milestone 3 missing information #22599

Closed

Description

@mmatlock-shr

I'm submitting a...


[x] Documentation issue or request

Current behavior

Confusing or missing steps in Milestone 3 of the Router section: https://angular.io/guide/router#add-heroes-functionality. The steps as given ask you to make a new directory, create an empty file, copy the contents of one TypeScript file (app.component.ts) into another (hero-list.component.ts), and then edit a template.

The issue is that it never asks you to copy over a specific template, and the TypeScript doesn't contain a template string. The possible html templates to copy over do not quite match the edits requested...or rather, two different ones do. The app.component.html has an h1 tag, but no h2 or hero detail. The heroes.component.html does have an h2 and hero detail, but no h1.

This then raises the question of whether the app.component.ts is what you're actually supposed to be copying from, or the heroes.component.ts, as neither html file has the entirety of code expecting to be modified, so it becomes unclear which typescript file is actually intended to be copied.

And then the list of files you are expected to have at the completion of this set of instructions contains only typescript. (hero-detail.component.ts, hero-list.component.ts, hero.service.ts, heroes.module.ts)

Expected behavior

The desired behavior would be to explain exactly which files need to be created or copied over, double-checking which file or project should be used to copy information over, and clarity about what should be copied where.

What is the motivation / use case for changing the behavior?

Clarity in training and tutelage of new angular developers.

Environment

N/A

Activity

  1. added this to the needsTriage milestone on Mar 6, 2018
  2. mmatlock-shr commented on Mar 7, 2018

    @mmatlock-shr
    Author

    Additionally, I have a clarification question:

    Delete the selector (routed components don't need them).

    Is this true, or does this mean to say "routed modules don't need them"? If it does intend to say routed components, I would request further clarification (or a link to further clarification) as to how a normal component isn't a "routed" component even if it is being loaded via router (or clarity in the Tour of Heroes tutorial that once you add routing you can remove selector from all components)

  3. modified the milestones: needsTriage, Backlog on May 15, 2018
  4. jenniferfell commented on May 15, 2018

    @jenniferfell
    Contributor

    docsarea=routing

  5. brandonroberts commented on Oct 8, 2018

    @brandonroberts
    Contributor

    Fixed via #20023

  6. angular-automatic-lock-bot commented on Sep 14, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  7. locked and limited conversation to collaborators on Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions