-
Notifications
You must be signed in to change notification settings - Fork 26.7k
docs: add missing import to CartService tutorial instructions
#42701
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ande1005 - I think we could also update the "props" docregion in the example code to show the import too: around this line https://github.com/angular/angular/blob/master/aio/content/examples/getting-started/src/app/cart.service.ts#L5
Add docregion markers so it ends up looking like:
// #docregion props
import { Product } from './products';
// #enddocregion props, import-http
|
You can preview 9b0dd92 at https://pr42701-9b0dd92.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking much better. I think we might need to remove the // #docplaster comment so that we get nice ... between the import statements and the class in the snippet.
Also, you'll note that the CI lint job is failing because the commits do not follow our required syntax. On your next update, can you squash all the commits into one and give it a commit message of something like:
docs: add missing import to `CartService` tutorial instructions
CartService tutorial instructions
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
Hi @ande1005 - thanks for making the changes and squashing the commit. |
|
You can preview 25700dd at https://pr42701-25700dd.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: global-docs-approvers
|
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. |

The 'Managing Data' part of the tutorial is missing an instruction to import
Productintocart.service.tsPR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The angular tutorial does not work as currently written.
Cannot find name 'Product'error is thrown when creating thecart.service.tsfile.Issue Number: N/A
What is the new behavior?
Include an instruction to import Product from
'./products'Does this PR introduce a breaking change?
Other information