I have been struggling for hours to figure out how to make my code work, but I simply cant. Here is part of my code (html and typescript):
HTML
<td *ngFor="let col of columns">
<!-- THIS DOESNT WORK -->
<div *ngIf="col.field == 'blabla'">
<span>{{validate(col)}}</span>
</div>
<!-- THIS WORKS -->
<div *ngIf="col.field == 'blabla2'">
<p-progressBar *ngIf="validateProgressBar(col) !== -1" [value]="progressValue">
</p-progressBar>
</div>
</td>
Typescript
validate(model: myModel) : string{
let value = '';
// lots of conditions where 'value' is modified
return value;
}
Comments
Post a Comment