refactor(pagination): move boundary & directions to the template

Closes #795
Closes #1770