Pagination example and nested controllers in AngularJs