Skip to content

Commit

Permalink
fix(learn): Remove errors discovered while following Angular todo lis…
Browse files Browse the repository at this point in the history
…t 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 <[email protected]>

---------

Co-authored-by: Onkar Ruikar <[email protected]>
Co-authored-by: Brian Thomas Smith <[email protected]>
  • Loading branch information
3 people authored Mar 15, 2024
1 parent 0e891a2 commit ef45a13
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit ef45a13

Please sign in to comment.