diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts b/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts index 413ad547e5..549da4f26b 100644 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts +++ b/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts @@ -11,7 +11,7 @@ import { products } from '../products'; templateUrl: './product-details.component.html', styleUrls: ['./product-details.component.css'] }) -// #docregion props-methods, add-to-cart, product-prop +// #docregion props-methods, product-prop export class ProductDetailsComponent implements OnInit { product; // #enddocregion product-prop @@ -29,9 +29,9 @@ export class ProductDetailsComponent implements OnInit { this.product = products.find(product => { return product.id === Number(productIdFromRoute); }); - // #docregion product-prop } - // #enddocregion product-prop // #enddocregion get-product + // #docregion product-prop + /* ... */ // #docregion props-methods } diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts b/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts index 8460b7cb9b..73a7339503 100644 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts +++ b/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts @@ -13,9 +13,9 @@ import { CartService } from '../cart.service'; templateUrl: './product-details.component.html', styleUrls: ['./product-details.component.css'] }) -// #docregion props-methods, get-product, inject-cart-service, add-to-cart +// #docregion props-methods, inject-cart-service, add-to-cart export class ProductDetailsComponent implements OnInit { -// #enddocregion add-to-cart, get-product, inject-cart-service +// #enddocregion add-to-cart, inject-cart-service product; // #docregion inject-cart-service @@ -27,7 +27,6 @@ export class ProductDetailsComponent implements OnInit { ) { } // #enddocregion inject-cart-service -// #docregion get-product ngOnInit() { // #enddocregion props-methods // First get the product id from the current route. @@ -39,11 +38,11 @@ export class ProductDetailsComponent implements OnInit { // #docregion props-methods } -// #enddocregion props-methods, get-product +// #enddocregion props-methods // #docregion add-to-cart addToCart(product) { this.cartService.addToCart(product); window.alert('Your product has been added to the cart!'); } -// #docregion props-methods, get-product, inject-cart-service +// #docregion props-methods, inject-cart-service } diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.html index 3bff6c54fc..2342c4bc9c 100644 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.html +++ b/aio/content/examples/getting-started/src/app/product-list/product-list.component.html @@ -8,19 +8,21 @@ {{ product.name }} - + +
Description: {{ product.description }}
- + - +