Mercurial > hg > ng2-query-ismi
comparison app/query-result.component.ts @ 21:930fe7460f6b
result table shows all attributes now.
| author | casties |
|---|---|
| date | Fri, 22 Jan 2016 20:33:26 +0100 |
| parents | 98b435bb6c0c |
| children | f6f4177d0a81 |
comparison
equal
deleted
inserted
replaced
| 20:34cd764e234b | 21:930fe7460f6b |
|---|---|
| 10 <div *ngIf="queryState"> | 10 <div *ngIf="queryState"> |
| 11 <pre>{{queryState.resultCypherQuery}}</pre> | 11 <pre>{{queryState.resultCypherQuery}}</pre> |
| 12 <p>Query results ({{queryState.resultInfo}}):</p> | 12 <p>Query results ({{queryState.resultInfo}}):</p> |
| 13 <table> | 13 <table> |
| 14 <tr> | 14 <tr> |
| 15 <th *ngIf="queryState.resultTypes=='node'">ID</th> | 15 <th *ngIf="queryState.resultTypes=='node' && queryState.resultColumns" |
| 16 <th *ngIf="queryState.resultTypes=='node'">Label</th> | 16 *ngFor="#col of queryState.resultColumns">{{col?col.label:col}}</th> |
| 17 <th *ngIf="queryState.resultTypes=='node'">Link</th> | |
| 18 </tr> | 17 </tr> |
| 19 <tr class="resultRow" *ngFor="#row of queryState.results" | 18 <tr class="resultRow" *ngFor="#row of queryState.results" |
| 20 [rowData]="row" [rowType]="queryState.resultTypes"> | 19 [rowData]="row" [rowType]="queryState.resultTypes" |
| 20 [columns]="queryState.resultColumns"> | |
| 21 </tr> | 21 </tr> |
| 22 </table> | 22 </table> |
| 23 </div> | 23 </div> |
| 24 `, | 24 `, |
| 25 directives: [QueryResultRowComponent], | 25 directives: [QueryResultRowComponent], |
| 26 inputs: ['queryState'] | 26 inputs: ['queryState'] |
| 27 }) | 27 }) |
| 28 | 28 |
| 29 export class QueryResultComponent implements OnInit { | 29 export class QueryResultComponent { |
| 30 | 30 |
| 31 public queryState: QueryState; | 31 public queryState: QueryState; |
| 32 | 32 |
| 33 ngOnChanges() { | |
| 34 console.debug("result changed!"); | |
| 35 } | |
| 36 | |
| 37 ngOnInit() { | |
| 38 this.setup(); | |
| 39 } | |
| 40 | |
| 41 setup() { | |
| 42 console.debug("result init!"); | |
| 43 } | |
| 44 | |
| 45 } | 33 } |
