question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular tutorial - cannot find name HEROES. and also one other pedantic point

See original GitHub issue

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

Parrt 3 of tutorial - MasterDetail. https://angular.io/tutorial/toh-pt2 heroes = HEROES; Browser error: Cannot find name ‘HEROES’. Studio code warning: [ts] Cannot find name HEROES as a warning If I replace with heroes:Hero[] = HEROES, it resolves.

On another minor ( but nonetheless important point)

Part 2 if tutorial: The Hero Editor https://angular.io/tutorial/toh-pt1

Quote- Add two properties to the AppComponent: a title property for the app name and a hero property for a hero named “Windstorm.”

At this point, the title property already exists. Adding of course will result in “Duplicate Identifier warning”. Pendantic I know, but good to get a tutorlal to follow without errors for us newbsters.

Expected behavior

Minimal reproduction of the problem with instructions

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

Environment


Angular version: 4.0.0


Browser:
- [ ] 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
 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

27reactions
ccsjessecommented, Jan 4, 2018

I got the same error but because I wrote: ‘heroes : HEROES;’. Error disappears when I corrected to ‘heroes = HEROES;’. Found the solution from: https://translate.google.ca/translate?hl=en&sl=ru&u=https://toster.ru/q/478059&prev=search

5reactions
andrew-lynchcommented, Oct 22, 2017

I had the same error where heroes = HEROES could not be found. However, once I restarted the server everything worked correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Cannot find name 'HEROES' error in Angular tutorial
At first, check your folder structure.You can find live example on: https://angular.io/tutorial/toh-pt2#final-code-review.
Read more >
angular/angular - Gitter
is there a guide somewhere that explains how to run development versions of the @angular packages? if I just npm link @angular/compiler, ...
Read more >
The Hero Editor - ts - TUTORIAL - Angular
Create a Hero class with id and name properties. Add these properties near the top of the app.component.ts file, just below the import...
Read more >
Having tough time with the Observer pattern - Ionic Angular
But when layered (logic dictates that), I cannot get rid of errors. Must each level subscribe to one lower levels's data? Where should...
Read more >
R ESUMES - ERIC
curriculum toward the study of heroes, which is the major theme of the ... One cannot touch Don Quixote or the life of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found