I want to apply multiple class but there is some difference here compared to other questions of Stackoverflow.
I have to dynamically assign icon class and also 'not-selected'
component.ts
list = [ { name: 'Name1', icon: 'icon_1' }, { name: 'Name2', icon: 'icon_2' } ]
<div *ngFor="let data of list"
[ngClass]="{ 'some_icon' : true , 'not-selected': selectedOperation?.name !== operation.name }">
{{data.name}}
</div>
I can see some_icon but what I need is dynamically assign data.icon too. something like:
<div *ngFor="let data of list"
[ngClass]="{ data.icon , 'not-selected': selectedVal?.name !== data.name }">
{{data.name}}
</div>
but this one is not the correct syntax. What am I missing ?