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

null ref error on ajax data #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dlebedynskyi
Copy link

added check to avoid undefined error is no pager was created yet

@michaelbromley
Copy link
Owner

Hi,
Thanks for the contribution. Could you outline the scenario that causes an error which is fixed by this?

@dlebedynskyi
Copy link
Author

@michaelbromley this one of cases when we have on pagination called before data received. Hard to say exact cause it is in deps of ng-view navigation with bunch of pagination and requests . I'll check and try to get some details for you.
also note that https://github.com/michaelbromley/angularUtils-pagination has same issue. Just updated to packed and had to patch same line

@dlebedynskyi
Copy link
Author

Update. Ok we have a call to reset current page numbers. this call may not be in correct point(ill try to work on it on my side ) but it leads to the point when there are 'new' that is awaiting for data, and old ones.
we call

 if (paginationService.isRegistered(instance))
                            paginationService.setCurrentPage(instance, 1);

for all. and at that point they don't have currentPageParser initialized yet

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

Successfully merging this pull request may close these issues.

2 participants