From f8920dfd70cc1fbd1de281978685f20a5a8c7eb7 Mon Sep 17 00:00:00 2001 From: Hadi Date: Wed, 17 May 2023 09:56:58 -0600 Subject: [PATCH] docs: update first-app-lesson-11.md to include info about routerLink (#50348) Add info about importing RouterLink and RouterOutlet. The existing document results in an error. The error indicates that the anchor element doesn't have the binding property for routerLink. The corresponding module (RouterModule) should be imported in the component template. Add description for RouterModule in housing-location component The description is added to fix the issue with the anchor element tag binding. PR Close #50348 --- aio/content/tutorial/first-app/first-app-lesson-11.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aio/content/tutorial/first-app/first-app-lesson-11.md b/aio/content/tutorial/first-app/first-app-lesson-11.md index c54b2384b26..dbaac097901 100644 --- a/aio/content/tutorial/first-app/first-app-lesson-11.md +++ b/aio/content/tutorial/first-app/first-app-lesson-11.md @@ -43,6 +43,8 @@ In this case, `:id` is dynamic and will change based on how the route is request The `routerLink` directive enables Angular's router to create dynamic links in the application. The value assigned to the `routerLink` is an array with two entries: the static portion of the path and the dynamic data. + + For the routerLink to work in the template, add a file level import of RouterLink and RouterOutlet from '@angular/router', then update the component imports array to include both RouterLink and RouterOutlet 1. At this point you can confirm that the routing is working in your app. In the browser, refresh the home page and click the "learn more" button for a housing location.