Mercurial > hg > ng2-query-ismi
comparison 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 |
comparison
equal
deleted
inserted
replaced
20:34cd764e234b | 21:930fe7460f6b |
---|---|
1 import {Component} from 'angular2/core'; | 1 import {Component} from 'angular2/core'; |
2 | 2 |
3 @Component({ | 3 @Component({ |
4 selector: 'tr.resultRow', | 4 selector: 'tr.resultRow', |
5 template: ` | 5 template: ` |
6 <td *ngIf="rowType=='node'">[{{rowData.ismi_id}}]</td> | 6 <td style="vertical-align: top;" |
7 <td *ngIf="rowType=='node'">{{rowData.label}}</td> | 7 *ngIf="rowType=='node'" *ngFor="#col of columns"> |
8 <td *ngIf="rowType=='node' && rowData.link"> | 8 <a *ngIf="col && col.name=='link'" href="{{rowData[col.name]}}" target="_blank">Link</a> |
9 <a href="https://ismi-dev.mpiwg-berlin.mpg.de/om4-ismi/browse/entityDetails.xhtml?eid={{rowData.ismi_id}}" target="_blank">view in OpenMind</a> | 9 <span *ngIf="col && col.name!='link'">{{rowData[col.name]}}</span> |
10 </td> | 10 </td> |
11 <td *ngIf="rowType=='text'">{{rowData}}</td> | 11 |
12 <td style="vertical-align: top;" | |
13 *ngIf="rowType=='text'">{{rowData}}</td> | |
12 `, | 14 `, |
13 inputs: ['rowData', 'rowType'] | 15 inputs: ['rowData', 'rowType', 'columns'] |
14 }) | 16 }) |
15 | 17 |
16 export class QueryResultRowComponent { | 18 export class QueryResultRowComponent { |
17 | 19 |
20 public rowType: string; | |
18 public rowData: any; | 21 public rowData: any; |
19 public rowType: string; | 22 public columns: any[]; |
20 | 23 |
24 /* ngOnInit() { | |
25 console.debug("row init! columns=", this.columns, " rowData=", this.rowData); | |
26 } */ | |
21 } | 27 } |