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

One way binding for current page #6629

Open
bohrasankalp opened this issue Dec 25, 2023 · 1 comment
Open

One way binding for current page #6629

bohrasankalp opened this issue Dec 25, 2023 · 1 comment

Comments

@bohrasankalp
Copy link

I'm trying to update currentPage using store management, but it ends up with Cannot assign to read only property 'currentPage' of object '[object Object]'.

<ng-container *ngIf="pagination$ | async as paginate">
	<pagination
		[(ngModel)]="paginate.currentPage"
		[boundaryLinks]="true"
		[itemsPerPage]="paginate.perPageRecords"
		[maxSize]="paginate.maxPaginationSize"
		[rotate]="true"
		[totalItems]="paginate.totalRecords"
		(pageChanged)="pageChanged($event)"></pagination>
</ng-container>

If I remove [(ngModel)]="paginate.currentPage" this works well if start with first page, but won't work in condition if I jump to intermediate page eg ?page=12.

Any work around for this?

@bohrasankalp
Copy link
Author

Any updates?

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