Skip to content

docs: Tour of Heroes: Incomplete code example #18078

Closed

Description

@nwayve

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

On page: https://angular.io/tutorial/toh-pt5#select-a-dashboard-hero
The code sample under: src/app/dashboard.component.html (repeated tag)
The code sample is incomplete and only shows:

<a *ngFor="let hero of heroes"  [routerLink]="['/detail', hero.id]"  class="col-1-4">

The anchor tag is missing its closing </a> that even the copy link in the code doesn't have.
If a user copies this as-is into their project file, they'll get a runtime error about a missing </div> tag.

Expected behavior

Should be what's in the downloaded example:

1  <a *ngFor="let hero of heroes" [routerLink]="['/detail', hero.id]"  class="col-1-4">
2    <div class="module hero">
3      <h4>{{hero.name}}</h4>
4    </div>
5  </a>

Minimal reproduction of the problem with instructions

Download the example zip file, remove lines 2-5 from the example above in the dashboard.component.html file and run the app.

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

Reduce new user confusion in learning Angular.

Environment


Angular version: 4.0.0

Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Activity

  1. added this to the needsTriage milestone on Feb 28, 2018
  2. jenniferfell commented on Jun 4, 2018

    @jenniferfell
    Contributor
  3. modified the milestones: needsTriage, Backlog on Jun 4, 2018
  4. sreevani-ship-it commented on Oct 8, 2018

    @sreevani-ship-it
    Contributor

    Fixed in PR #24445

  5. 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.

  6. 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

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions