Mercurial > hg > ng2-query-ismi
view app/query-result-row.component.ts @ 44:3779464b830e ng2-rc1
update to angular2-rc1. mostly working ;-(
Starting 'ng2-rc1' branch
author | casties |
---|---|
date | Tue, 14 Jun 2016 19:58:53 +0200 |
parents | 930fe7460f6b |
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); } */ }