Angular tutorial - cannot find name HEROES. and also one other pedantic point
See original GitHub issueI’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:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
I had the same error where
heroes = HEROES
could not be found. However, once I restarted the server everything worked correctly.