Mercurial > hg > ng2-query-ismi
diff src/app/query-result-row.component.ts @ 48:f8d6f8479e77 ng2-final
first working version with angular 2.4 (using old table w/o pager).
author | casties |
---|---|
date | Mon, 20 Mar 2017 18:12:48 +0100 |
parents | b65a031c4967 |
children |
line wrap: on
line diff
--- a/src/app/query-result-row.component.ts Fri Mar 17 20:16:52 2017 +0100 +++ b/src/app/query-result-row.component.ts Mon Mar 20 18:12:48 2017 +0100 @@ -3,14 +3,16 @@ @Component({ selector: 'tr.resultRow', template: ` - <td style="vertical-align: top;" - *ngIf="rowType=='node'" *ngFor="let col of columns"> + <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> - - <td style="vertical-align: top;" - *ngIf="rowType=='text'">{{rowData}}</td> + </td> + </ng-container> + <ng-container *ngIf="rowType=='text'"> + <td style="vertical-align: top;">{{rowData}}</td> + </ng-container> `, inputs: ['rowData', 'rowType', 'columns'] }) @@ -21,7 +23,7 @@ public rowData: any; public columns: any[]; - /* ngOnInit() { - console.debug("row init! columns=", this.columns, " rowData=", this.rowData); - } */ + ngOnInit() { + console.debug("row init! rowType=", this.rowType, " columns=", this.columns, " rowData=", this.rowData); + } }