Mercurial > hg > ng2-query-ismi
comparison app/query-result-table.component.ts @ 45:dc4f0541f04d ng2-rc1
update to angular2-rc1. mostly working ;-(
author | casties |
---|---|
date | Tue, 14 Jun 2016 20:00:39 +0200 |
parents | 99fb5a953a40 |
children |
comparison
equal
deleted
inserted
replaced
44:3779464b830e | 45:dc4f0541f04d |
---|---|
1 import {Component, OnInit} from 'angular2/core'; | 1 import {Component, OnInit} from '@angular/core'; |
2 | 2 |
3 import {NG_TABLE_DIRECTIVES} from 'ng2-table/ng2-table'; | 3 import {NG_TABLE_DIRECTIVES} from 'ng2-table/ng2-table'; |
4 import {PAGINATION_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap'; | 4 import {PAGINATION_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap'; |
5 | 5 |
6 import {QueryState} from './query-state'; | 6 import {QueryState} from './query-state'; |
25 results per page. | 25 results per page. |
26 </div> | 26 </div> |
27 <div> | 27 <div> |
28 <form (ngSubmit)="onSelectCols($event)"> | 28 <form (ngSubmit)="onSelectCols($event)"> |
29 Columns: | 29 Columns: |
30 <span *ngFor="#col of allColumns"> | 30 <span *ngFor=" let col of allColumns"> |
31 <input type="checkbox" value="{{col.name}}" [(ngModel)]="col.show">{{col.name}} | 31 <input type="checkbox" value="{{col.name}}" [(ngModel)]="col.show">{{col.name}} |
32 </span> | 32 </span> |
33 <button type="submit">change columns</button> | 33 <button type="submit">change columns</button> |
34 </form> | 34 </form> |
35 </div> | 35 </div> |
43 [boundaryLinks]="true" | 43 [boundaryLinks]="true" |
44 [rotate]="false" | 44 [rotate]="false" |
45 (pageChanged)="onChangeTable(config, $event)" | 45 (pageChanged)="onChangeTable(config, $event)" |
46 (numPages)="numPages = $event"> | 46 (numPages)="numPages = $event"> |
47 </pagination> | 47 </pagination> |
48 <ngTable | 48 <ng-table |
49 [config]="config.sorting" | 49 [config]="config.sorting" |
50 (tableChanged)="onChangeTable($event)" | 50 (tableChanged)="onChangeTable($event)" |
51 [rows]="rows" [columns]="columns"> | 51 [rows]="rows" [columns]="columns"> |
52 </ngTable> | 52 </ng-table> |
53 </div> | 53 </div> |
54 </div> | 54 </div> |
55 `, | 55 `, |
56 inputs: ['queryState', 'resultInfo'], | 56 inputs: ['queryState', 'resultInfo'], |
57 directives: [NG_TABLE_DIRECTIVES, PAGINATION_DIRECTIVES] | 57 directives: [NG_TABLE_DIRECTIVES, PAGINATION_DIRECTIVES] |