For some reason I can't access a class attribute when looping a list in html inside a angular's ngFor.
The error I'm getting is Property 'User' does not exist on type 'AppComponent', when I've clearly imported the file and I'm using it without any problems inside app.component.ts.
At the moment I have this, which is creating the error in User.filteredusers. Also, I've included the Users class in the typescript file I'm using.
app.component.html
<tr *ngFor="let user of User.filteredUsers |
paginate: {
itemsPerPage: resultsPerPage,
currentPage: page,
totalItems: totalLength
}">
<th scope="row">{{ user.id }}</th>
<td>{{ user.name }}</td>
<td>{{ user.contact }}</td>
<td>{{ user.login }}</td>
</tr>
app.component.ts
// ...
import { User } from './user.model';
// ...
user.model.ts
export class User{
// ...
static filteredUsers = new Array<User>();
// ...