如何在 ngx-mat-select-search palceholderLabel 中添加 i18n
<div class="form-group col-md-6 mb-lg-5 mb-4">
<mat-form-field class="example-full-width w-100">
<mat-select (selectionChange)='vehicle_maker_updated($event)' formControlName="vehicleMakerValue" placeholder="Motor Make" i18n-placeholder>
<mat-option>
<ngx-mat-select-search formControlName="vehicleMakerFilterInputValue" placeholder="Select Motor Maker" [noEntriesFoundLabel]="'No matching vehicle makers found'" (ngModelChange)='filter_vehicle_makers($event)' i18n-placeholder></ngx-mat-select-search>
</mat-option>
<mat-option *ngFor="let vehicle_maker_option of filtered_vehicle_maker_options" [value]="vehicle_maker_option.id">
{{vehicle_maker_option.name}}
</mat-option>
</mat-select>
<mat-error *ngIf="vehicleMakerValue.hasError('required')" i18n>
Select motor make
</mat-error>
</mat-form-field>
</div>
我已经添加了 i18n 占位符,但它不起作用
你需要使用placeholderLabel
属性(参见https://github.com/bithost-gmbh/ngx-mat-select-search#inputs https://github.com/bithost-gmbh/ngx-mat-select-search#inputs)
<ngx-mat-select-search
formControlName="vehicleMakerFilterInputValue"
placeholderLabel="Select Motor Maker"
[noEntriesFoundLabel]="'No matching vehicle makers found'"
(ngModelChange)='filter_vehicle_makers($event)'
i18n-placeholderLabel>
</ngx-mat-select-search>
哪里的placeholderLabel
and i18n-placeholderLabel
属性是相关的
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)