#211 Move to ngSwitchCase

This commit is contained in:
Denys Vuika
2016-06-17 11:31:30 +01:00
parent 71efa47fde
commit e04101b5c2
2 changed files with 5 additions and 5 deletions

View File

@@ -42,11 +42,11 @@
<td *ngFor="let col of data.getColumns()" [ngSwitch]="col.type" <td *ngFor="let col of data.getColumns()" [ngSwitch]="col.type"
class="mdl-data-table__cell--non-numeric non-selectable data-cell {{col.cssClass}}" class="mdl-data-table__cell--non-numeric non-selectable data-cell {{col.cssClass}}"
(click)="onRowClick(row, $event)" (dblclick)="onRowDblClick(row, $event)"> (click)="onRowClick(row, $event)" (dblclick)="onRowDblClick(row, $event)">
<div *ngSwitchWhen="'image'"> <div *ngSwitchCase="'image'">
<i *ngIf="isIconValue(row, col)" class="material-icons icon-cell">{{asIconValue(row, col)}}</i> <i *ngIf="isIconValue(row, col)" class="material-icons icon-cell">{{asIconValue(row, col)}}</i>
<img *ngIf="!isIconValue(row, col)" class="image-cell" alt="" src="{{data.getValue(row, col)}}"> <img *ngIf="!isIconValue(row, col)" class="image-cell" alt="" src="{{data.getValue(row, col)}}">
</div> </div>
<div *ngSwitchWhen="'text'"> <div *ngSwitchCase="'text'">
{{data.getValue(row, col)}} {{data.getValue(row, col)}}
</div> </div>
<span *ngSwitchDefault> <span *ngSwitchDefault>

View File

@@ -1,6 +1,6 @@
<ol *ngIf="breadcrumb" data-automation-id="breadcrumb" class="breadcrumb"> <ol *ngIf="breadcrumb" data-automation-id="breadcrumb" class="breadcrumb">
<li *ngFor="let r of route; let last = last" [class.active]="last" [ngSwitch]="last"> <li *ngFor="let r of route; let last = last" [class.active]="last" [ngSwitch]="last">
<span *ngSwitchWhen="true">{{r.name}}</span> <span *ngSwitchCase="true">{{r.name}}</span>
<a *ngSwitchDefault href="#" [attr.data-automation-id]="'breadcrumb_' + r.name" (click)="goToRoute(r, $event)">{{r.name}}</a> <a *ngSwitchDefault href="#" [attr.data-automation-id]="'breadcrumb_' + r.name" (click)="goToRoute(r, $event)">{{r.name}}</a>
</li> </li>
</ol> </ol>
@@ -46,10 +46,10 @@
(dblclick)="onItemDblClick(content, $event)" (dblclick)="onItemDblClick(content, $event)"
[context-menu]="getContextActions(content)" [context-menu]="getContextActions(content)"
[attr.data-automation-id]="col.source === '$thumbnail' ? '$thumbnail' : col.source + '_' + getObjectValue(content.entry, col.source)"> [attr.data-automation-id]="col.source === '$thumbnail' ? '$thumbnail' : col.source + '_' + getObjectValue(content.entry, col.source)">
<div *ngSwitchWhen="'image'" class="cell-value"> <div *ngSwitchCase="'image'" class="cell-value">
<img class="thumbnail" [src]="getCellValue(content, col)"> <img class="thumbnail" [src]="getCellValue(content, col)">
</div> </div>
<span *ngSwitchWhen="'date'" class="cell-value"> <span *ngSwitchCase="'date'" class="cell-value">
{{ getCellValue(content, col) }} {{ getCellValue(content, col) }}
</span> </span>
<span *ngSwitchDefault class="cell-value"> <span *ngSwitchDefault class="cell-value">