How can I access a TypeScript variable inside an ngIf statement?
TS:
public data: string;
HTML:
<td>
<div *ngIf="data === 'BALL' ; else noplay" >{{ play }}</div>
<ng-template #noplay> {{ gotohome }}
</ng-template>
</td>
I am attempting to use conditional logic in Angular to display different values in a table based on the value of the "data" variable. However, I am struggling to access the "data" variable from TypeScript.
Here is a sample StackBlitz link for reference:
https://stackblitz.com/edit/angular-ivy-c6zyqg?file=src%2Fapp%2Fapp.component.html