Commit 515990c9 authored by François Agneray's avatar François Agneray
Browse files

#15 => done

parent aa502b48
<p>
<button (click)="click()">click</button>
</p>
<accordion>
<accordion-group #ag [panelClass]="'custom-accordion'" class="my-2">
<accordion-group (isOpenChange)="initDatatable()" #ag [panelClass]="'custom-accordion'" class="my-2">
<button class="btn btn-link btn-block clearfix" accordion-heading>
<div class="pull-left float-left">
Datatable
......@@ -13,7 +9,7 @@
</div>
</button>
<div *ngIf="searchMeta">
<div class="table-responsive-sm">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
......@@ -27,7 +23,12 @@
</tbody>
</table>
</div>
<pagination [totalItems]="searchMeta.total_items" (pageChanged)="getSearchData.emit($event.page)"></pagination>
<div class="mt-3">
<p>Total items {{searchMeta.total_items}}</p>
</div>
<div class="mt-3">
<pagination [totalItems]="searchMeta.total_items" [boundaryLinks]="true" [rotate]="true" [maxSize]="5" (pageChanged)="getSearchData.emit($event.page)"></pagination>
</div>
</div>
</accordion-group>
</accordion>
......@@ -14,7 +14,7 @@ export class DatatableComponent {
@Output() initSearchMeta: EventEmitter<{}> = new EventEmitter();
@Output() getSearchData: EventEmitter<number> = new EventEmitter();
click() {
initDatatable() {
this.initSearchMeta.emit();
this.getSearchData.emit(1);
}
......
<p>
Direct link to the result (JSON format): <a target="_blank" [href]="getUrl()">{{ getUrl() }}</a>
</p>
\ No newline at end of file
<accordion>
<accordion-group (isOpenChange)="initDatatable()" #ag [isOpen]="true" [panelClass]="'custom-accordion'" class="my-2">
<button class="btn btn-link btn-block clearfix" accordion-heading>
<div class="pull-left float-left">
Direct link to the result (JSON)
&nbsp;
<span *ngIf="ag.isOpen"><i class="fas fa-chevron-up"></i></span>
<span *ngIf="!ag.isOpen"><i class="fas fa-chevron-down"></i></span>
</div>
</button>
<div>
<p>
<a target="_blank" [href]="getUrl()">{{ getUrl() }}</a>
</p>
</div>
</accordion-group>
</accordion>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment