2

this is my code that I was stuck on:

<ul>
  <li *ngFor="let item in items">{{item.Title}}</li>
</ul>
Neo Jabin
  • 23
  • 4
  • 8
    The correct syntax is `*ngFor="let item of items"`. https://angular.io/api/common/NgForOf. – Kurt Hamilton Nov 01 '21 at 12:56
  • Normally this would be a problem with forgetting to import `CommonModule` in a feature module. Since it appears to be a typo instead, I have voted to close as a typo instead of as a duplicate. For reference: [Forgetting to import `CommonModule`](https://stackoverflow.com/questions/40331549/cant-bind-to-ngforof-since-it-isnt-a-known-property-of-tr-final-release) and [Forgetting to import `FormsModule`](https://stackoverflow.com/questions/38892771/cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-input?rq=1) – D M Nov 01 '21 at 13:14

1 Answers1

2

There is issue with the *ngFor syntax. Do like this:

<ul>
  <li *ngFor="let item of items">{{item.Title}}</li>
</ul>

in is replaced with of

Tushar
  • 1,948
  • 1
  • 13
  • 32