Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default template flashes when using ngIf on custom template controls #82

Closed
michaelbromley opened this issue Oct 13, 2016 · 0 comments
Closed

Comments

@michaelbromley
Copy link
Owner

michaelbromley commented Oct 13, 2016

Angular 2 version: 2.1.0

ng2-pagination version: 0.5.1

Description of issue: When a pagination controls component is using a custom template, and the controls have an *ngIf on them, hiding and then re-showing the controls will cause the default template to flash before it is replaced by the custom template.

Any relevant code:

<ul>
  <li *ngFor="let item of collection | paginate: { itemsPerPage: 10, currentPage: p }">{{ item }}</li>
</ul>

<input type="checkbox" [(ngModel)]="showControls" label="show controls">

<pagination-controls (pageChange)="p = $event" #api *ngIf="showControls">
  <div> my custom template</div>
</pagination-controls>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant