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
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
I had to implement a pagination, where instead of page numbers, specific strings need to be displayed (first three letters of first and last item in the page). The only way to do it, was to tweak makePage function.
Currently the function is:
// Create page object used in templatefunctionmakePage(number,text,isActive){return{number: number,text: text,active: isActive};}
And when it is called, the number is passed as a text:
// Add page number linksfor(varnumber=startPage;number<=endPage;number++){varpage=makePage(number,number,number===currentPage);pages.push(page);}
So what I did, is added an extra attribute to the directive, to which I can pass an array with the pagination indexes (separately prepared in a backend, with same size as number of total pages). These values are added when the page is created.
Do you you think it could be a good idea, to add the new attribute, which can be responsible for overriding default number pages? In that case, of course, preparation of valid values for override is a developer's responsibility.
The text was updated successfully, but these errors were encountered:
Another option is for the attribute to just provide a function that returns the text for a specified index. Either way this feature would be very desirable.
Hey!
I had to implement a pagination, where instead of page numbers, specific strings need to be displayed (first three letters of first and last item in the page). The only way to do it, was to tweak makePage function.
Currently the function is:
And when it is called, the number is passed as a text:
So what I did, is added an extra attribute to the directive, to which I can pass an array with the pagination indexes (separately prepared in a backend, with same size as number of total pages). These values are added when the page is created.
Do you you think it could be a good idea, to add the new attribute, which can be responsible for overriding default number pages? In that case, of course, preparation of valid values for override is a developer's responsibility.
The text was updated successfully, but these errors were encountered: