Error "Can't bind to 'ngFor' since it isn't a known native property" in Angular
Hello everyone! I'm a beginner in Angular and TypeScript, trying to learn how to work with lists. I have a simple component that should display a list of users. Here is my component code:
```typescript
import { Component } from '@angular/core';
@Component({
selector: 'app-user-list',
template: `
`
})
export class UserListComponent {
users = [
{ name: 'Ivan', age: 25 },
{ name: 'Maria', age: 30 },
{ name: 'Petr', age: 28 }
];
}
```
But when I run the application, I get an error in the browser console:
```
ERROR Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'ngFor' since it isn't a
User list
- {{ user.name }}
No answers yet.
Log in to leave an answer