Yesterday we got pagination working on our contact app. For our exercise, let's try and make that pagination display a little smarter. In the template, make the first, previous, next, and last page links only clickable when a user can advance the page in the direction of the link. If the page attribute is at the beginning or end of the total pages disable the appropriate links.
Links
- Component Helper by Romina Vargas
- Pagination in Ember with a JSON API Backend by Frank Treacy
- Ember Global Meetup Vimeo Page
- Ember: Declarative Templating with Composable Helpers by Lauren Tan We could almost certainly make some of our code from yesterday a little cleaner with the help of composable helpers . See here the Math Helper for example.
Comments for Exercise