Directivize pagination

@prabinv , @texasag Please code review.
Adding @hippee-lee for completeness.