Mercurial > hg > ng2-query-ismi
view src/app/query-result-row.component.ts @ 47:b65a031c4967 ng2-final
first step to angular2-final (2.4) version of the query browser.
author | casties |
---|---|
date | Fri, 17 Mar 2017 20:16:52 +0100 |
parents | app/query-result-row.component.ts@dc4f0541f04d |
children | f8d6f8479e77 |
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); } */ }