{"action":"created","comment":{"url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/comments/50621566","id":50621566,"diff_hunk":"@@ -0,0 +1,24 @@\n+angular.module('tnTravel').directive('tnPagination', function(){\n+  return {\n+    templateUrl: 'app/directives/pagination/pagination.html',\n+    link: function(scope, iElement, iAttrs) {\n+      scope.itemsOnPage = 2;\n+      scope.currentPage = 1;\n+\n+      scope.setPage = function(page) {\n+        scope.currentPage = page;\n+        scope.pageBeginIndex = scope.itemsOnPage * (page - 1);\n+        return scope.pageBeginIndex;\n+      };\n+\n+      scope.numberOfPages = function(array) {\n+        if (typeof array == 'undefined') {\n+          return new Array(Math.ceil(iAttrs.travels.length / scope.itemsOnPage));","path":"app/directives/pagination/pagination.directive.js","position":16,"original_position":16,"commit_id":"019e04beb5e8b3b6802b12392823f660744e0bc5","original_commit_id":"019e04beb5e8b3b6802b12392823f660744e0bc5","user":{"login":"anaumov","id":1510570,"avatar_url":"https://avatars.githubusercontent.com/u/1510570?v=3","gravatar_id":"","url":"https://api.github.com/users/anaumov","html_url":"https://github.com/anaumov","followers_url":"https://api.github.com/users/anaumov/followers","following_url":"https://api.github.com/users/anaumov/following{/other_user}","gists_url":"https://api.github.com/users/anaumov/gists{/gist_id}","starred_url":"https://api.github.com/users/anaumov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anaumov/subscriptions","organizations_url":"https://api.github.com/users/anaumov/orgs","repos_url":"https://api.github.com/users/anaumov/repos","events_url":"https://api.github.com/users/anaumov/events{/privacy}","received_events_url":"https://api.github.com/users/anaumov/received_events","type":"User","site_admin":false},"body":"`iAttrs.travels` очень ограничивает директиву. Мы же хотим ее сделать применимой везде и передавать туда абстрактную коллекцию. Тут получается, что в атрибутах должен быть `travelers`, что не похоже на абстрактное решение ;)","created_at":"2016-01-23T15:56:36Z","updated_at":"2016-01-23T15:56:36Z","html_url":"https://github.com/ArseniyKanev/tn-travel/pull/8#discussion_r50621566","pull_request_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/comments/50621566"},"html":{"href":"https://github.com/ArseniyKanev/tn-travel/pull/8#discussion_r50621566"},"pull_request":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8","id":56747289,"html_url":"https://github.com/ArseniyKanev/tn-travel/pull/8","diff_url":"https://github.com/ArseniyKanev/tn-travel/pull/8.diff","patch_url":"https://github.com/ArseniyKanev/tn-travel/pull/8.patch","issue_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/8","number":8,"state":"open","locked":false,"title":"Exercise 7","user":{"login":"ArseniyKanev","id":9465382,"avatar_url":"https://avatars.githubusercontent.com/u/9465382?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyKanev","html_url":"https://github.com/ArseniyKanev","followers_url":"https://api.github.com/users/ArseniyKanev/followers","following_url":"https://api.github.com/users/ArseniyKanev/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyKanev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyKanev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyKanev/subscriptions","organizations_url":"https://api.github.com/users/ArseniyKanev/orgs","repos_url":"https://api.github.com/users/ArseniyKanev/repos","events_url":"https://api.github.com/users/ArseniyKanev/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyKanev/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-21T13:14:22Z","updated_at":"2016-01-23T15:56:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2819b01522d98777f2944d409456f07232e360a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8/commits","review_comments_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8/comments","review_comment_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/8/comments","statuses_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/statuses/019e04beb5e8b3b6802b12392823f660744e0bc5","head":{"label":"ArseniyKanev:exercise_7","ref":"exercise_7","sha":"019e04beb5e8b3b6802b12392823f660744e0bc5","user":{"login":"ArseniyKanev","id":9465382,"avatar_url":"https://avatars.githubusercontent.com/u/9465382?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyKanev","html_url":"https://github.com/ArseniyKanev","followers_url":"https://api.github.com/users/ArseniyKanev/followers","following_url":"https://api.github.com/users/ArseniyKanev/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyKanev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyKanev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyKanev/subscriptions","organizations_url":"https://api.github.com/users/ArseniyKanev/orgs","repos_url":"https://api.github.com/users/ArseniyKanev/repos","events_url":"https://api.github.com/users/ArseniyKanev/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyKanev/received_events","type":"User","site_admin":false},"repo":{"id":44050300,"name":"tn-travel","full_name":"ArseniyKanev/tn-travel","owner":{"login":"ArseniyKanev","id":9465382,"avatar_url":"https://avatars.githubusercontent.com/u/9465382?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyKanev","html_url":"https://github.com/ArseniyKanev","followers_url":"https://api.github.com/users/ArseniyKanev/followers","following_url":"https://api.github.com/users/ArseniyKanev/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyKanev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyKanev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyKanev/subscriptions","organizations_url":"https://api.github.com/users/ArseniyKanev/orgs","repos_url":"https://api.github.com/users/ArseniyKanev/repos","events_url":"https://api.github.com/users/ArseniyKanev/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyKanev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArseniyKanev/tn-travel","description":"Learning angularjs","fork":false,"url":"https://api.github.com/repos/ArseniyKanev/tn-travel","forks_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/forks","keys_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/teams","hooks_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/hooks","issue_events_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/events{/number}","events_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/events","assignees_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/assignees{/user}","branches_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/branches{/branch}","tags_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/tags","blobs_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/statuses/{sha}","languages_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/languages","stargazers_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/stargazers","contributors_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/contributors","subscribers_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/subscribers","subscription_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/subscription","commits_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/contents/{+path}","compare_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/merges","archive_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/downloads","issues_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues{/number}","pulls_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls{/number}","milestones_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/milestones{/number}","notifications_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/labels{/name}","releases_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/releases{/id}","deployments_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/deployments","created_at":"2015-10-11T11:56:17Z","updated_at":"2015-12-22T13:16:33Z","pushed_at":"2016-01-21T13:51:57Z","git_url":"git://github.com/ArseniyKanev/tn-travel.git","ssh_url":"git@github.com:ArseniyKanev/tn-travel.git","clone_url":"https://github.com/ArseniyKanev/tn-travel.git","svn_url":"https://github.com/ArseniyKanev/tn-travel","homepage":null,"size":12123,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ArseniyKanev:master","ref":"master","sha":"875a6ebc82add34975a64d1e815d68508c22ced1","user":{"login":"ArseniyKanev","id":9465382,"avatar_url":"https://avatars.githubusercontent.com/u/9465382?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyKanev","html_url":"https://github.com/ArseniyKanev","followers_url":"https://api.github.com/users/ArseniyKanev/followers","following_url":"https://api.github.com/users/ArseniyKanev/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyKanev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyKanev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyKanev/subscriptions","organizations_url":"https://api.github.com/users/ArseniyKanev/orgs","repos_url":"https://api.github.com/users/ArseniyKanev/repos","events_url":"https://api.github.com/users/ArseniyKanev/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyKanev/received_events","type":"User","site_admin":false},"repo":{"id":44050300,"name":"tn-travel","full_name":"ArseniyKanev/tn-travel","owner":{"login":"ArseniyKanev","id":9465382,"avatar_url":"https://avatars.githubusercontent.com/u/9465382?v=3","gravatar_id":"","url":"https://api.github.com/users/ArseniyKanev","html_url":"https://github.com/ArseniyKanev","followers_url":"https://api.github.com/users/ArseniyKanev/followers","following_url":"https://api.github.com/users/ArseniyKanev/following{/other_user}","gists_url":"https://api.github.com/users/ArseniyKanev/gists{/gist_id}","starred_url":"https://api.github.com/users/ArseniyKanev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArseniyKanev/subscriptions","organizations_url":"https://api.github.com/users/ArseniyKanev/orgs","repos_url":"https://api.github.com/users/ArseniyKanev/repos","events_url":"https://api.github.com/users/ArseniyKanev/events{/privacy}","received_events_url":"https://api.github.com/users/ArseniyKanev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArseniyKanev/tn-travel","description":"Learning angularjs","fork":false,"url":"https://api.github.com/repos/ArseniyKanev/tn-travel","forks_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/forks","keys_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/teams","hooks_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/hooks","issue_events_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/events{/number}","events_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/events","assignees_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/assignees{/user}","branches_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/branches{/branch}","tags_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/tags","blobs_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/statuses/{sha}","languages_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/languages","stargazers_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/stargazers","contributors_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/contributors","subscribers_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/subscribers","subscription_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/subscription","commits_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/contents/{+path}","compare_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/merges","archive_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/downloads","issues_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues{/number}","pulls_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls{/number}","milestones_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/milestones{/number}","notifications_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/labels{/name}","releases_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/releases{/id}","deployments_url":"https://api.github.com/repos/ArseniyKanev/tn-travel/deployments","created_at":"2015-10-11T11:56:17Z","updated_at":"2015-12-22T13:16:33Z","pushed_at":"2016-01-21T13:51:57Z","git_url":"git://github.com/ArseniyKanev/tn-travel.git","ssh_url":"git@github.com:ArseniyKanev/tn-travel.git","clone_url":"https://github.com/ArseniyKanev/tn-travel.git","svn_url":"https://github.com/ArseniyKanev/tn-travel","homepage":null,"size":12123,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8"},"html":{"href":"https://github.com/ArseniyKanev/tn-travel/pull/8"},"issue":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/8"},"comments":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/ArseniyKanev/tn-travel/statuses/019e04beb5e8b3b6802b12392823f660744e0bc5"}}}}