Quote from
Ingo on April 9, 2018, 11:36 am
Hi,
I searched for Google for a long time but did not find anything.
In the mat-table I have no problems and it works perfectly.
<ng-container matColumnDef="rateOfTax">
<mat-header-cell *matHeaderCellDef mat-sort-header> {{'vatRate.RateOfTax' | translate}} </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.rateOfTax | percent:'2.2-5'}}</mat-cell>
</ng-container>
but how can I use the pipe in the ngForm?
mat-form-field [floatLabel]="floatLabels" fxFlex>
<mat-label>{{'vatRate.RateOfTax' | translate}}</mat-label>
<input matInput formControlName="rateOfTax" [readonly]="!isEditMode" type="number" step ="0.01"/>
<mat-error *ngIf="rateOfTax.hasError('required')">{{'vatRate.errors.RateOfTaxRequired' | translate}}</mat-error>
</mat-form-field>
Hi,
I searched for Google for a long time but did not find anything.
In the mat-table I have no problems and it works perfectly.
<ng-container matColumnDef="rateOfTax">
<mat-header-cell *matHeaderCellDef mat-sort-header> {{'vatRate.RateOfTax' | translate}} </mat-header-cell>
<mat-cell *matCellDef="let row"> {{row.rateOfTax | percent:'2.2-5'}}</mat-cell>
</ng-container>
but how can I use the pipe in the ngForm?
mat-form-field [floatLabel]="floatLabels" fxFlex>
<mat-label>{{'vatRate.RateOfTax' | translate}}</mat-label>
<input matInput formControlName="rateOfTax" [readonly]="!isEditMode" type="number" step ="0.01"/>
<mat-error *ngIf="rateOfTax.hasError('required')">{{'vatRate.errors.RateOfTaxRequired' | translate}}</mat-error>
</mat-form-field>