In ref to question using autocomplete how to filter object on multiple attributes, I have filtered object based on name and type. In the value attribute of mat-option I want to display objects name and type attribute togather, how to do this?
I tried [value] ="option.name (option.type)" I see errors
You can use it as a expression :
[value]="option?.name + ' ('+ option?.type + ')'"
OR
value = "{{ option?.name + ' (' + option?.type + ')' }}"
1.4m articles
1.4m replys
5 comments
57.0k users