TextPagination directive for AngularJS