Mercurial > hg > ng2-query-ismi
view src/app/query-result-row.component.ts @ 61:6adf95d9a190 webpack
fix missing resultInfo. add column template for WITNESS.
author | Robert Casties <casties@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 24 Apr 2017 19:39:25 +0200 |
parents | f8d6f8479e77 |
children |
line wrap: on
line source
import {Component} from '@angular/core'; @Component({ selector: 'tr.resultRow', template: ` <ng-container *ngIf="rowType=='node'"> <td style="vertical-align: top;" *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> </ng-container> <ng-container *ngIf="rowType=='text'"> <td style="vertical-align: top;">{{rowData}}</td> </ng-container> `, inputs: ['rowData', 'rowType', 'columns'] }) export class QueryResultRowComponent { public rowType: string; public rowData: any; public columns: any[]; ngOnInit() { console.debug("row init! rowType=", this.rowType, " columns=", this.columns, " rowData=", this.rowData); } }