{"action":"created","issue":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/211","labels_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/211/comments","events_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/211/events","html_url":"https://github.com/michaelbromley/angularUtils/issues/211","id":100094719,"number":211,"title":"Pagination: bind `itemsPerPage` in custom template","user":{"login":"benoror","id":119117,"avatar_url":"https://avatars.githubusercontent.com/u/119117?v=3","gravatar_id":"","url":"https://api.github.com/users/benoror","html_url":"https://github.com/benoror","followers_url":"https://api.github.com/users/benoror/followers","following_url":"https://api.github.com/users/benoror/following{/other_user}","gists_url":"https://api.github.com/users/benoror/gists{/gist_id}","starred_url":"https://api.github.com/users/benoror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoror/subscriptions","organizations_url":"https://api.github.com/users/benoror/orgs","repos_url":"https://api.github.com/users/benoror/repos","events_url":"https://api.github.com/users/benoror/events{/privacy}","received_events_url":"https://api.github.com/users/benoror/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/michaelbromley/angularUtils/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-10T15:29:47Z","updated_at":"2015-08-14T18:50:37Z","closed_at":null,"body":"I would like to have access to the directive's `itemsPerPage` property in order bind it in my custom pagination template:\r\n\r\n    <div>\r\n      <select\r\n        ng-model=\"itemsPerPage\"\r\n        ng-options=\"o as o for o in itemsPerPage\">\r\n      </select>\r\n      records per page\r\n    </div>"},"comment":{"url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/comments/131207897","html_url":"https://github.com/michaelbromley/angularUtils/issues/211#issuecomment-131207897","issue_url":"https://api.github.com/repos/michaelbromley/angularUtils/issues/211","id":131207897,"user":{"login":"benoror","id":119117,"avatar_url":"https://avatars.githubusercontent.com/u/119117?v=3","gravatar_id":"","url":"https://api.github.com/users/benoror","html_url":"https://github.com/benoror","followers_url":"https://api.github.com/users/benoror/followers","following_url":"https://api.github.com/users/benoror/following{/other_user}","gists_url":"https://api.github.com/users/benoror/gists{/gist_id}","starred_url":"https://api.github.com/users/benoror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoror/subscriptions","organizations_url":"https://api.github.com/users/benoror/orgs","repos_url":"https://api.github.com/users/benoror/repos","events_url":"https://api.github.com/users/benoror/events{/privacy}","received_events_url":"https://api.github.com/users/benoror/received_events","type":"User","site_admin":false},"created_at":"2015-08-14T18:50:37Z","updated_at":"2015-08-14T18:50:37Z","body":"Hi! I would be glad to contribute, could you give me a clue about where to look at?\r\n\r\nWould this test be sufficient?\r\n\r\n    describe('pagination controls template API', function() {\r\n\r\n        function compile() {\r\n            var html = '<ul class=\"list\"><li dir-paginate=\"item in collection | itemsPerPage: pageSize\" current-page=\"currentPage\">{{ item }}</li></ul> ' +\r\n                '<dir-pagination-controls template-url=\"directives/pagination/testTemplate.tpl.html\"></dir-pagination-controls>';\r\n            $scope.collection = [1,2,3,4,5,6,7];\r\n            $scope.pageSize = 3;\r\n            $scope.currentPage = 1;\r\n            containingElement.append($compile(html)($scope));\r\n            $scope.$apply();\r\n        }\r\n\r\n        it('should provide correct values for page size', function() {\r\n            compile();\r\n\r\n            expect(containingElement.find('#tt-page-size').html()).toEqual('3');\r\n            $scope.$apply(function() {\r\n                $scope.pageSize = 2;\r\n            });\r\n            expect(containingElement.find('#tt-page-size').html()).toEqual('2');\r\n        });\r\n\r\n      /* ... */"}}