You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The paginator works fine. I currently has 33 items in the node I am paginating. The page size is 30. when i attempt to navigate to the 2nd page, which should have 3 items, the following error is displayed in the console:
angular.module('firebasePaginator',[]).factory('$firebasePaginator',function($firebaseArray){returnfunction(ref,field,pageSize,cb){cb=cb||function(){};// create a Paginate referencevarpageRef=newfirebase.util.Paginate(ref,field,{maxCacheSize: 250,pageSize: pageSize});// generate a synchronized array using the special page refvarlist=$firebaseArray(pageRef);list.loaded=false;// store the "page" scope on the synchronized array for easy accesslist.currentPage=1;list.ref=pageRef;list.ready=false;list.$loaded().then(function(){list.loaded=true;cb(list);});pageRef.page.onPageCount(function(currentPageCount,couldHaveMore){list.pageCount=currentPageCount;list.couldHaveMore=couldHaveMore;list.ready=true;});// when the current page is changed, update local scope varspageRef.page.onPageChange(function(p){list.currentPage=p;});list.go=function(page){page=~~page;if(page<1){page=1;}if(page>list.pageCount){page=list.pageCount;}pageRef.page.setPage(page);};list.next=function(){pageRef.page.next();};list.prev=function(){pageRef.page.prev();};// load the first pagepageRef.page.next();returnlist;}});
I'm not sure what the problem here is. Going to try and dig into it.
The text was updated successfully, but these errors were encountered:
The paginator works fine. I currently has 33 items in the node I am paginating. The page size is 30. when i attempt to navigate to the 2nd page, which should have 3 items, the following error is displayed in the console:
I'm using a thin wrapper around this library:
I'm not sure what the problem here is. Going to try and dig into it.
The text was updated successfully, but these errors were encountered: