Angular 2 ngSwitch nested in ngFor -


what correct way use ngswitch within ngfor?

if following receive error

got interpolation ({{}}) expression expected

<span *ngfor="let action of actions">     <span [ngswitch]="{{action}}">         <span *ngswitchcase='edit'>edit</span>         <span *ngswitchcase='delete'>delete</span>     </span> </span> 

in bindings (...) or [...] don't need interpolate variable string, can use bind it.

<span [ngswitch]="action"> 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -