this is my html
<div class="mb-3">
<label for="filterText" class="form-label">Ürün ara</label>
<input type="text" class="form-control" id="filterText"
placeholder="arama ifadesi giriniz">
</div>
<h4 style="text-align: left">Müşteriler</h4>
<table class="table">
<thead class="table-light">
<tr>
<td scope="col">Id</td>
<td scope="col">İsim</td>
<td scope="col">Email</td>
<td scope="col">Soyisim</td>
</thead>
<tbody>
<tr *ngFor="let users of users">
<td>{{users.Id}}</td>
</tr>
</tbody>
this is my .ts
import { Component, OnInit } from "@angular/core";
import { Users } from "src/app/models/Users";
import { AuthService } from "src/app/services/auth.service";
@Component({
selector: 'app-users',
templateUrl: './users.component.html',
styleUrls: ['./users.component.css'],
})
export class UsersComponent implements OnInit {
user: Users ;
users : Users[] = []
dataLoaded = false;
filterText="";
constructor(private authservice: AuthService
) {}
ngOnInit(): void {
this.getusers()
}
getusers() {
this.authservice.getusers().subscribe(response=>{
this.user = response.data
console.log(this.users)
this.dataLoaded = true;
})
}
getById(Id:number) {
this.authservice.getById(Id).subscribe(response=>{
this.user= response.data
this.dataLoaded = true;
})
}
}
this is error when i start the browser i see what should i do
NG0303: Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘tr’. core.mjs:10178
Angular 3
UsersComponent_Template users.component.html:21
Angular 22
RxJS 6
Angular 8
emit
checkStable
onHasTask
hasTask
_updateTaskCount
_updateTaskCount
runTask
drainMicroTaskQueue