angularUtils icon indicating copy to clipboard operation
angularUtils copied to clipboard

null ref error on ajax data

Open dlebedynskyi opened this issue 10 years ago • 3 comments

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

dlebedynskyi avatar Jul 16 '15 15:07 dlebedynskyi

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

michaelbromley avatar Jul 24 '15 07:07 michaelbromley

@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 avatar Aug 14 '15 18:08 dlebedynskyi

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

dlebedynskyi avatar Aug 14 '15 18:08 dlebedynskyi