Issue
<ng-select
[items]="prozessItem$ | async"
[multiple]="true"
bindLabel="itemName | umlautsPipe"
bindValue="nrItems"
></ng-select>
I want to pipe the itemName from "üäößTEST"
to "ueaeoessTest"
. The async pipe works just fine and without the pipe I get "üäößTEST"
. Ng-select only accepts a string value in the attribute. I may be misunderstanding it but I believe that when I use bindLabel="itemName | umlautsPipe"
, ng-select is attempting to reference item[itemName | umlautsPipe]
which does not exist.
So how can I transform the name of the item?
Solution
It seems like you have to use a template, try:
<ng-select
[items]="prozessItem$ | async"
[multiple]="true"
bindValue="nrItems"
>
<ng-template ng-option-tmp ng-label-tmp let-item="item">
{{ item.itemName | umlautsPipe }}
</ng-template>
</ng-select>
Answered By - AliF50
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.