comparison 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
comparison
equal deleted inserted replaced
46:1f3fed01aef6 47:b65a031c4967
1 import {Component} from '@angular/core';
2
3 @Component({
4 selector: 'tr.resultRow',
5 template: `
6 <td style="vertical-align: top;"
7 *ngIf="rowType=='node'" *ngFor="let col of columns">
8 <a *ngIf="col && col.name=='link'" href="{{rowData[col.name]}}" target="_blank">Link</a>
9 <span *ngIf="col && col.name!='link'">{{rowData[col.name]}}</span>
10 </td>
11
12 <td style="vertical-align: top;"
13 *ngIf="rowType=='text'">{{rowData}}</td>
14 `,
15 inputs: ['rowData', 'rowType', 'columns']
16 })
17
18 export class QueryResultRowComponent {
19
20 public rowType: string;
21 public rowData: any;
22 public columns: any[];
23
24 /* ngOnInit() {
25 console.debug("row init! columns=", this.columns, " rowData=", this.rowData);
26 } */
27 }