docs: add missing import to `CartService` tutorial instructions (#42701)

PR Close #42701
This commit is contained in:
Ryan Andersen 2021-07-01 09:11:56 -04:00 committed by Andrew Scott
parent 0c0c32d539
commit e064f177a7
2 changed files with 3 additions and 2 deletions

View File

@ -1,9 +1,9 @@
// #docplaster
// #docregion import-http
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
// #docregion props
import { Product } from './products';
// #enddocregion import-http
// #enddocregion props, import-http
@Injectable({
providedIn: 'root'

View File

@ -30,6 +30,7 @@ This section walks you through adding a **Buy** button and setting up a cart ser
<code-example header="src/app/cart.service.ts" path="getting-started/src/app/cart.service.1.ts"></code-example>
1. Import the `Product` interface from `./products.js`.
1. In the `CartService` class, define an `items` property to store the array of the current products in the cart.
<code-example path="getting-started/src/app/cart.service.ts" header="src/app/cart.service.ts" region="props"></code-example>