Mercurial > hg > ng2-query-ismi
view app/query-result-row.component.ts @ 45:dc4f0541f04d ng2-rc1
update to angular2-rc1. mostly working ;-(
author | casties |
---|---|
date | Tue, 14 Jun 2016 20:00:39 +0200 |
parents | 930fe7460f6b |
children |
line wrap: on
line source
import {Component} from '@angular/core'; @Component({ selector: 'tr.resultRow', template: ` <td style="vertical-align: top;" *ngIf="rowType=='node'" *ngFor="let col of columns"> <a *ngIf="col && col.name=='link'" href="{{rowData[col.name]}}" target="_blank">Link</a> <span *ngIf="col && col.name!='link'">{{rowData[col.name]}}</span> </td> <td style="vertical-align: top;" *ngIf="rowType=='text'">{{rowData}}</td> `, inputs: ['rowData', 'rowType', 'columns'] }) export class QueryResultRowComponent { public rowType: string; public rowData: any; public columns: any[]; /* ngOnInit() { console.debug("row init! columns=", this.columns, " rowData=", this.rowData); } */ }