{"action":"created","comment":{"url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/comments/56361051","id":56361051,"diff_hunk":"@@ -29,20 +27,18 @@ angular.module('directives.contactInformation', ['services.contactInformation'])\n     return {\n       restrict: 'E',\n       replace: true,\n-      scope: {},\n+      scope: {\n+        portfolio: '='\n+      },\n       templateUrl: 'app/directives/contactInformation/contactInformation.html',\n       link: function($scope) {\n \n         $scope.editing = false;\n-        $scope.contactInformation = {};\n-        $scope.contactInformation.someLinks = [];\n+        $scope.contactInformation = $scope.portfolio.contactInformation || {};\n \n-        PortfolioService.getPortfolio().then(function(portfolio) {\n-          $scope.portfolio = portfolio;\n-          ContactInformationService.getContactInformation($scope.portfolio.id).then(function(data) {\n-            $scope.contactInformation = data;\n-          });\n-        });\n+        if($scope.contactInformation) {\n+          $scope.contactInformation.someLinks = $scope.contactInformation.someLinks || [];","path":"src/app/directives/contactInformation/contactInformation.directive.js","position":32,"original_position":32,"commit_id":"215cc7bc6f40432b777209a5de2030b6f24fe054","original_commit_id":"215cc7bc6f40432b777209a5de2030b6f24fe054","user":{"login":"markorautajoki","id":1059322,"avatar_url":"https://avatars.githubusercontent.com/u/1059322?v=3","gravatar_id":"","url":"https://api.github.com/users/markorautajoki","html_url":"https://github.com/markorautajoki","followers_url":"https://api.github.com/users/markorautajoki/followers","following_url":"https://api.github.com/users/markorautajoki/following{/other_user}","gists_url":"https://api.github.com/users/markorautajoki/gists{/gist_id}","starred_url":"https://api.github.com/users/markorautajoki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markorautajoki/subscriptions","organizations_url":"https://api.github.com/users/markorautajoki/orgs","repos_url":"https://api.github.com/users/markorautajoki/repos","events_url":"https://api.github.com/users/markorautajoki/events{/privacy}","received_events_url":"https://api.github.com/users/markorautajoki/received_events","type":"User","site_admin":false},"body":"Tarvitaanko tyhjä array?","created_at":"2016-03-16T16:00:41Z","updated_at":"2016-03-16T16:00:41Z","html_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pull/18#discussion_r56361051","pull_request_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/comments/56361051"},"html":{"href":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pull/18#discussion_r56361051"},"pull_request":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18","id":63066109,"html_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pull/18","diff_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pull/18.diff","patch_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pull/18.patch","issue_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/18","number":18,"state":"open","locked":false,"title":"get portfolio components off of portfolio itself instead of dispatchi…","user":{"login":"hheiskanen","id":6654979,"avatar_url":"https://avatars.githubusercontent.com/u/6654979?v=3","gravatar_id":"","url":"https://api.github.com/users/hheiskanen","html_url":"https://github.com/hheiskanen","followers_url":"https://api.github.com/users/hheiskanen/followers","following_url":"https://api.github.com/users/hheiskanen/following{/other_user}","gists_url":"https://api.github.com/users/hheiskanen/gists{/gist_id}","starred_url":"https://api.github.com/users/hheiskanen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hheiskanen/subscriptions","organizations_url":"https://api.github.com/users/hheiskanen/orgs","repos_url":"https://api.github.com/users/hheiskanen/repos","events_url":"https://api.github.com/users/hheiskanen/events{/privacy}","received_events_url":"https://api.github.com/users/hheiskanen/received_events","type":"User","site_admin":false},"body":"…ng GET reqs for them","created_at":"2016-03-16T13:43:52Z","updated_at":"2016-03-16T16:00:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffd040ab2f6259cffd07d7fb5ff447a7c3848731","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18/commits","review_comments_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18/comments","review_comment_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/18/comments","statuses_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/statuses/215cc7bc6f40432b777209a5de2030b6f24fe054","head":{"label":"UH-StudentServices:refactor/OO-494-portfolio-component-loading","ref":"refactor/OO-494-portfolio-component-loading","sha":"215cc7bc6f40432b777209a5de2030b6f24fe054","user":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"repo":{"id":46274138,"name":"mystudies-myteaching-frontend-portfolio","full_name":"UH-StudentServices/mystudies-myteaching-frontend-portfolio","owner":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio","description":"","fork":false,"url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio","forks_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/forks","keys_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/teams","hooks_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/hooks","issue_events_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/events{/number}","events_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/events","assignees_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/assignees{/user}","branches_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/branches{/branch}","tags_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/tags","blobs_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/refs{/sha}","trees_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/statuses/{sha}","languages_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/languages","stargazers_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/stargazers","contributors_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/contributors","subscribers_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/subscribers","subscription_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/subscription","commits_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/commits{/sha}","git_commits_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/commits{/sha}","comments_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/comments{/number}","issue_comment_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/comments{/number}","contents_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/contents/{+path}","compare_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/merges","archive_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/downloads","issues_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues{/number}","pulls_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls{/number}","milestones_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/milestones{/number}","notifications_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/labels{/name}","releases_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/releases{/id}","deployments_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/deployments","created_at":"2015-11-16T12:47:09Z","updated_at":"2016-01-19T09:49:11Z","pushed_at":"2016-03-16T13:43:52Z","git_url":"git://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio.git","ssh_url":"git@github.com:UH-StudentServices/mystudies-myteaching-frontend-portfolio.git","clone_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio.git","svn_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio","homepage":null,"size":870,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"develop"}},"base":{"label":"UH-StudentServices:develop","ref":"develop","sha":"0ae6887b988a15e622ee8335eae644698062a9ef","user":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"repo":{"id":46274138,"name":"mystudies-myteaching-frontend-portfolio","full_name":"UH-StudentServices/mystudies-myteaching-frontend-portfolio","owner":{"login":"UH-StudentServices","id":11271527,"avatar_url":"https://avatars.githubusercontent.com/u/11271527?v=3","gravatar_id":"","url":"https://api.github.com/users/UH-StudentServices","html_url":"https://github.com/UH-StudentServices","followers_url":"https://api.github.com/users/UH-StudentServices/followers","following_url":"https://api.github.com/users/UH-StudentServices/following{/other_user}","gists_url":"https://api.github.com/users/UH-StudentServices/gists{/gist_id}","starred_url":"https://api.github.com/users/UH-StudentServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UH-StudentServices/subscriptions","organizations_url":"https://api.github.com/users/UH-StudentServices/orgs","repos_url":"https://api.github.com/users/UH-StudentServices/repos","events_url":"https://api.github.com/users/UH-StudentServices/events{/privacy}","received_events_url":"https://api.github.com/users/UH-StudentServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio","description":"","fork":false,"url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio","forks_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/forks","keys_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/teams","hooks_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/hooks","issue_events_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/events{/number}","events_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/events","assignees_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/assignees{/user}","branches_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/branches{/branch}","tags_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/tags","blobs_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/refs{/sha}","trees_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/statuses/{sha}","languages_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/languages","stargazers_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/stargazers","contributors_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/contributors","subscribers_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/subscribers","subscription_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/subscription","commits_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/commits{/sha}","git_commits_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/git/commits{/sha}","comments_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/comments{/number}","issue_comment_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/comments{/number}","contents_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/contents/{+path}","compare_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/merges","archive_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/downloads","issues_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues{/number}","pulls_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls{/number}","milestones_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/milestones{/number}","notifications_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/labels{/name}","releases_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/releases{/id}","deployments_url":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/deployments","created_at":"2015-11-16T12:47:09Z","updated_at":"2016-01-19T09:49:11Z","pushed_at":"2016-03-16T13:43:52Z","git_url":"git://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio.git","ssh_url":"git@github.com:UH-StudentServices/mystudies-myteaching-frontend-portfolio.git","clone_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio.git","svn_url":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio","homepage":null,"size":870,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18"},"html":{"href":"https://github.com/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pull/18"},"issue":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/18"},"comments":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/UH-StudentServices/mystudies-myteaching-frontend-portfolio/statuses/215cc7bc6f40432b777209a5de2030b6f24fe054"}}}}