From ef45a13f2c3b18d27386e3057a1acc8e6400efee Mon Sep 17 00:00:00 2001 From: Pignated <91336649+Pignated@users.noreply.github.com> Date: Fri, 15 Mar 2024 08:41:50 -0500 Subject: [PATCH] fix(learn): Remove errors discovered while following Angular todo list app Guide (#32132) * Added changes to remove errors discovered while following instructions. Imported CommonModule (could only import NgFor instead) and set app component as standalone. Without importing NgFor, ngForOf won't bind to li used in the template. Angular expects the component to be standalone. There could be better ways to fix this, I'm writing this while going through the tutorial. * Update files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/angular_todo_list_beginning/index.md Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> --------- Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com> Co-authored-by: Brian Thomas Smith --- .../angular_todo_list_beginning/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/angular_todo_list_beginning/index.md b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/angular_todo_list_beginning/index.md index 608e095b4f3efb0..44ec298c4b2a176 100644 --- a/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/angular_todo_list_beginning/index.md +++ b/files/en-us/learn/tools_and_testing/client-side_javascript_frameworks/angular_todo_list_beginning/index.md @@ -92,8 +92,11 @@ In `app.component.ts`, replace the contents with the following: ```js import { Component } from "@angular/core"; +import { CommonModule } from "@angular/common"; @Component({ + standalone: true, + imports: [CommonModule], selector: "app-root", templateUrl: "./app.component.html", styleUrls: ["./app.component.css"],