0
ninomartini created
- ABP Framework version: v3.04
- UI type: Angular
I can't figure out how to use two or more ngx-datatables on the same page using the ListService.
Table 1:
ngx-datatable [rows]="data.items" [count]="data.totalCount" [list]="list" default>
Table 2:
<ngx-datatable [rows]="dataMessages.items" [count]="dataMessages.totalCount" [list]="list" default>
Going to page 2 on one table causes the other table to also go to page two. How do I break this synchronization?
1 Answer(s)
-
2
Solved by creating a factory function.
providers: [ { provide: 'list', useClass: ListService }, { provide: 'unitMessageList', useClass: ListService }, ...] constructor( @Inject('list') public readonly list: ListService, @Inject('unitMessageList') public readonly unitMessageList: ListService, ... }