Cześć Mam takie pytanie dlaczego NgClass tutaj zawsze zwraca jakby false dodaje tylko tą drugą klasę kiedy sprawdzam console.log() i wartość jest true :(
<span *ngIf="startPage > 1">
<li [ngClass]="(page===currentPage)?'deactive': 'active'">1</li>
</span>
ngOnInit() {
const page = parseInt(this.route.snapshot.paramMap.get('page'));
this.http.get(`https://localhost:44333/Tenure/GetAll/${page}`).subscribe((x:any)=> {
this.data = x.payload;
this.totalPages = x.totalPages;
this.startPage = x.startPage;
this.endPage = x.endPage;
this.currentPage = x.currentPage;
console.log(x);
console.log(this.totalPages);
console.log(this.endPage);
console.log(this.startPage);
console.log(page);
console.log(this.currentPage);
console.log(page===this.currentPage);