From 6b4c5289b383f387bf5f761d57fac2e611cf691b Mon Sep 17 00:00:00 2001 From: Sonu Kapoor Date: Mon, 9 Mar 2020 05:34:41 -0400 Subject: [PATCH] fix(docs-infra): remove `routerLink` from `top-bar` (#35951) Closes #35947 PR Close #35951 --- .../src/app/top-bar/top-bar.component.html | 2 +- .../src/app/top-bar/top-bar.component.html | 4 +++- aio/content/start/start-data.md | 17 ++++++++++------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html index dafaed6350..65d9126136 100644 --- a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html +++ b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html @@ -2,4 +2,4 @@

My Store

-shopping_cartCheckout \ No newline at end of file +shopping_cartCheckout \ No newline at end of file diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html index f96b490311..4891580712 100644 --- a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html +++ b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html @@ -2,6 +2,8 @@

My Store

- + + shopping_cartCheckout + diff --git a/aio/content/start/start-data.md b/aio/content/start/start-data.md index 5b9bfeb3c4..2b89ae94db 100644 --- a/aio/content/start/start-data.md +++ b/aio/content/start/start-data.md @@ -141,19 +141,22 @@ Create the cart page in two steps: +1. Update the "Checkout" button so that it routes to the `/cart` url. + + Open `top-bar.component.html` and add a `routerLink` directive pointing to `/cart`. + + + + 1. To see the new cart component, click the "Checkout" button. You can see the "cart works!" default text, and the URL has the pattern `https://getting-started.stackblitz.io/cart`, where `getting-started.stackblitz.io` may be different for your StackBlitz project. -
- - The starter code for the "Checkout" button already includes a `routerLink` for `/cart` the top-bar component. - -
- - ### Display the cart items You can use services to share data across components: