Mercurial > hg > ng2-query-ismi
view app/query-result-row.component.ts @ 21:930fe7460f6b
result table shows all attributes now.
author | casties |
---|---|
date | Fri, 22 Jan 2016 20:33:26 +0100 |
parents | 98b435bb6c0c |
children | dc4f0541f04d |
line wrap: on
line source
import {Component} from 'angular2/core'; @Component({ selector: 'tr.resultRow', template: ` <td style="vertical-align: top;" *ngIf="rowType=='node'" *ngFor="#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); } */ }