-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tour of Heroes tutorial, chapter 6 (services) - inclusion of HeroesService includes MessageService, which doesn't come until further down #20398
Comments
Good catch! |
running into the same issue... |
…e, which doesn't come until further down (angular#20398) Change TOH docs where the MessageService is referenced within the Providers array, but it isn't generated until later in the Services tutorial. Fixes angular#20398
That helped fixing it. Thx @jhenderson2099 On the other hand this tutorial could benefit from a global description of "what we need" and "how it works" as an introduction. A diagram could help too (a 1000 words vs 1 image). Or split it in 2 or more parts. At the end of each part the application should still work. This document is rather long. I mean by that : I don't think opening another issue is relevant for this (no category that fit). But in the end it may help the authors to make this tutorial evolve. (Frenchie' over here, sorry for my English) |
No problem @4E71-NOP I agree. The application should work each time the instructions indicate to "try it". Although, I can hardly take credit. I'm just the person who submitted a fix in the documentation and submitted the pull request. Hopefully it will be incorporated into the online documentation soon :-D |
…ing MessageService. Change TOH docs Fixes angular#20398
I believe the error in the documentation comes from the code referenced at this location:
The md file that references this module is located here: |
This has been fixed with a documentation patch that I submitted (above). Awaiting approval for pull request. |
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398
Change MessageService reference/formatting Fixes angular#20398
Hi, This error has not been fixed. Newbie here that spend an hour depbugging before commenting out "MessageService" |
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398
Like I said...waiting on the pull request. |
Change docs where the MessageService is referenced Fixes angular#20398
Change docs where the MessageService is referenced Fixes angular#20398 PR Close angular#21228
Change docs where the MessageService is referenced Fixes angular#20398 PR Close angular#21228
I'm following the tutorial and inclusion of the services in providers array is not needed!!! But, i don't know whay, but in the MessageService you must change the name of the method "add" with otherone name like "insert". With "add" not compile. MessageService:
HeroService:
|
Re the last comment, this is something which changed in ng 6 - the |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Having added the heroes service via the CLI, the copy/paste code invites us to add the providers, but includes the MessageService, which we don't see until later. This will confuse learners and is probably just an error.
providers: [ HeroService, MessageService ],
It would probably also be worth mentioning that there is already an empty providers there, which should be overwritten.
A simple error which should be relatively easy to fix but would make life a lot easier for newbies trying to follow.
The text was updated successfully, but these errors were encountered: