Can anyone help me with ngx-translate? I'm struggling to figure out how to dynamically translate resources in HTML.
Here's an example:
"agreement.status.0": "New",
"agreement.status.1": "Rejected",
And here is the corresponding HTML code:
<span>
<mat-form-field appearance="outline">
<mat-label>{{'choiceType' | translate}}</mat-label>
<mat-select [(ngModel)]="selectedAgreementType">
<mat-option *ngFor="let state of agreementStates" [value]="state.id">
{{ 'agreement.status.' + state.id | translate}}
</mat-option>
</mat-select>
</mat-form-field>
</span>
I'm struggling to understand how to link a fixed string constant with a variable. Please guide me on this!