Created
July 18, 2018 03:55
-
-
Save ZackDeRose/59e14a7562b51b97951f859d4b3d4866 to your computer and use it in GitHub Desktop.
Template for Search and Pagination for "Angular CDK Tables" article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="col-6"> | |
<div class="form-inline"> | |
<div class="form-group"> | |
<div class="input-group mr-3"> | |
<input | |
type="text" | |
class="form-control" | |
placeholder="Search…" | |
[formControl]="searchFormControl"> | |
<div class="input-group-append"> | |
<button | |
class="btn btn-outline-secondary" | |
(click)="searchFormControl.setValue('')"> | |
x | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="col-6"> | |
<div class="float-right"> | |
<ngb-pagination | |
[collectionSize]="tableDataSource$.value.length" | |
[pageSize]="pageSize$.value" | |
[page]="currentPage$.value" | |
(pageChange)="currentPage$.next($event)"> | |
</ngb-pagination> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment