{"action":"created","comment":{"url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/comments/100409768","pull_request_review_id":21117004,"id":100409768,"diff_hunk":"@@ -4,30 +4,49 @@\n require('./scss/main.scss');\n \n // npm modules\n-const cowsay = require('cowsay-browser');\n-const angular = require('angular');\n-\n-// app modules\n+let cowsay = require('cowsay-browser');\n+let angular = require('angular');\n \n // angular module\n-const demoApp = angular.module('demoApp', []);\n+let demoApp = angular.module('demoApp', []);\n \n // angular constructus\n demoApp.controller('CowsayController', CowsayController);\n \n-function CowsayController($log, $scope){\n+function CowsayController($log){\n   $log.debug('init CowsayController');\n-  let cowsayCtrl = $scope.cowsayCtrl = {};\n-  cowsayCtrl.title = 'Moooooo';\n-\n-  cowsayCtrl.updateCow = function(input){\n-    $log.debug('cowsayCtrl.updateCow()');\n-    return '\\n' + cowsay.say({text: input || 'gimme something to say'});\n+  this.title = 'Cowsay Controller Lab';\n+  this.history = [];\n+\n+  cowsay.list((err, cowfiles) => {\n+    this.cowfiles = cowfiles;\n+    this.currentCow = this.cowfiles[0];\n+    console.log('currentCow', this.currentCow);\n+  });\n+\n+  this.updateCow = function(input){\n+    $log.debug('this.updateCow()');\n+    return '\\n' + cowsay.say({text: input || 'gimme something to say', f: this.currentCow});\n   };\n \n-  cowsayCtrl.helloClick = function(input){\n-    $log.debug('cowsayCtrl.helloClick()');\n-    $log.log(input);\n+  this.speak = function(input){\n+    $log.debug('this.updateCow()');\n+    this.spoken = this.updateCow(input);\n+    this.history.push(this.spoken);\n+    console.log('this.history', this.history);\n   };\n \n+  this.undo = function(){\n+    $log.debug('this.undo()');\n+    console.log('this.history', this.history);\n+    this.history.pop();","path":"lab-jonathan/app/entry.js","position":54,"original_position":54,"commit_id":"5482a692f93d47bd7e84557c5e9264af6997c831","original_commit_id":"5482a692f93d47bd7e84557c5e9264af6997c831","user":{"login":"sjschmidt44","id":8696424,"avatar_url":"https://avatars.githubusercontent.com/u/8696424?v=3","gravatar_id":"","url":"https://api.github.com/users/sjschmidt44","html_url":"https://github.com/sjschmidt44","followers_url":"https://api.github.com/users/sjschmidt44/followers","following_url":"https://api.github.com/users/sjschmidt44/following{/other_user}","gists_url":"https://api.github.com/users/sjschmidt44/gists{/gist_id}","starred_url":"https://api.github.com/users/sjschmidt44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjschmidt44/subscriptions","organizations_url":"https://api.github.com/users/sjschmidt44/orgs","repos_url":"https://api.github.com/users/sjschmidt44/repos","events_url":"https://api.github.com/users/sjschmidt44/events{/privacy}","received_events_url":"https://api.github.com/users/sjschmidt44/received_events","type":"User","site_admin":false},"body":"This is broken logic here, given that you're popping off your history array twice. It 'works' but isn't correct. Give it some thought, and play around with it in the browser to see if you can refactor to the correct logic.","created_at":"2017-02-09T20:56:31Z","updated_at":"2017-02-09T20:58:20Z","html_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pull/13#discussion_r100409768","pull_request_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/comments/100409768"},"html":{"href":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pull/13#discussion_r100409768"},"pull_request":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13","id":104715001,"html_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pull/13","diff_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pull/13.diff","patch_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pull/13.patch","issue_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues/13","number":13,"state":"open","locked":false,"title":"Lab22 jd","user":{"login":"spamalope01","id":4063357,"avatar_url":"https://avatars.githubusercontent.com/u/4063357?v=3","gravatar_id":"","url":"https://api.github.com/users/spamalope01","html_url":"https://github.com/spamalope01","followers_url":"https://api.github.com/users/spamalope01/followers","following_url":"https://api.github.com/users/spamalope01/following{/other_user}","gists_url":"https://api.github.com/users/spamalope01/gists{/gist_id}","starred_url":"https://api.github.com/users/spamalope01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spamalope01/subscriptions","organizations_url":"https://api.github.com/users/spamalope01/orgs","repos_url":"https://api.github.com/users/spamalope01/repos","events_url":"https://api.github.com/users/spamalope01/events{/privacy}","received_events_url":"https://api.github.com/users/spamalope01/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-05T20:58:06Z","updated_at":"2017-02-09T20:58:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"643324887a0907835aaeb7a0e2fa17ba744ddb60","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13/commits","review_comments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13/comments","review_comment_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues/13/comments","statuses_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/statuses/5482a692f93d47bd7e84557c5e9264af6997c831","head":{"label":"spamalope01:lab22JD","ref":"lab22JD","sha":"5482a692f93d47bd7e84557c5e9264af6997c831","user":{"login":"spamalope01","id":4063357,"avatar_url":"https://avatars.githubusercontent.com/u/4063357?v=3","gravatar_id":"","url":"https://api.github.com/users/spamalope01","html_url":"https://github.com/spamalope01","followers_url":"https://api.github.com/users/spamalope01/followers","following_url":"https://api.github.com/users/spamalope01/following{/other_user}","gists_url":"https://api.github.com/users/spamalope01/gists{/gist_id}","starred_url":"https://api.github.com/users/spamalope01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spamalope01/subscriptions","organizations_url":"https://api.github.com/users/spamalope01/orgs","repos_url":"https://api.github.com/users/spamalope01/repos","events_url":"https://api.github.com/users/spamalope01/events{/privacy}","received_events_url":"https://api.github.com/users/spamalope01/received_events","type":"User","site_admin":false},"repo":{"id":80680490,"name":"lab-21-intro-to-angular-webpack","full_name":"spamalope01/lab-21-intro-to-angular-webpack","owner":{"login":"spamalope01","id":4063357,"avatar_url":"https://avatars.githubusercontent.com/u/4063357?v=3","gravatar_id":"","url":"https://api.github.com/users/spamalope01","html_url":"https://github.com/spamalope01","followers_url":"https://api.github.com/users/spamalope01/followers","following_url":"https://api.github.com/users/spamalope01/following{/other_user}","gists_url":"https://api.github.com/users/spamalope01/gists{/gist_id}","starred_url":"https://api.github.com/users/spamalope01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spamalope01/subscriptions","organizations_url":"https://api.github.com/users/spamalope01/orgs","repos_url":"https://api.github.com/users/spamalope01/repos","events_url":"https://api.github.com/users/spamalope01/events{/privacy}","received_events_url":"https://api.github.com/users/spamalope01/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spamalope01/lab-21-intro-to-angular-webpack","description":null,"fork":true,"url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack","forks_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/forks","keys_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/teams","hooks_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/hooks","issue_events_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/issues/events{/number}","events_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/events","assignees_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/assignees{/user}","branches_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/branches{/branch}","tags_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/tags","blobs_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/statuses/{sha}","languages_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/languages","stargazers_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/stargazers","contributors_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/contributors","subscribers_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/subscribers","subscription_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/subscription","commits_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/contents/{+path}","compare_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/merges","archive_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/downloads","issues_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/issues{/number}","pulls_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/pulls{/number}","milestones_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/milestones{/number}","notifications_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/labels{/name}","releases_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/releases{/id}","deployments_url":"https://api.github.com/repos/spamalope01/lab-21-intro-to-angular-webpack/deployments","created_at":"2017-02-02T00:49:19Z","updated_at":"2017-01-30T23:29:05Z","pushed_at":"2017-02-05T20:57:37Z","git_url":"git://github.com/spamalope01/lab-21-intro-to-angular-webpack.git","ssh_url":"git@github.com:spamalope01/lab-21-intro-to-angular-webpack.git","clone_url":"https://github.com/spamalope01/lab-21-intro-to-angular-webpack.git","svn_url":"https://github.com/spamalope01/lab-21-intro-to-angular-webpack","homepage":null,"size":9648,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codefellows-seattle-javascript-401n3:master","ref":"master","sha":"ad5b1625c2ce9ac2c2371337830b5c007661a8cd","user":{"login":"codefellows-seattle-javascript-401n3","id":23367489,"avatar_url":"https://avatars.githubusercontent.com/u/23367489?v=3","gravatar_id":"","url":"https://api.github.com/users/codefellows-seattle-javascript-401n3","html_url":"https://github.com/codefellows-seattle-javascript-401n3","followers_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/followers","following_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/following{/other_user}","gists_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/gists{/gist_id}","starred_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/subscriptions","organizations_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/orgs","repos_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/repos","events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/events{/privacy}","received_events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/received_events","type":"Organization","site_admin":false},"repo":{"id":80474379,"name":"lab-21-intro-to-angular-webpack","full_name":"codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack","owner":{"login":"codefellows-seattle-javascript-401n3","id":23367489,"avatar_url":"https://avatars.githubusercontent.com/u/23367489?v=3","gravatar_id":"","url":"https://api.github.com/users/codefellows-seattle-javascript-401n3","html_url":"https://github.com/codefellows-seattle-javascript-401n3","followers_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/followers","following_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/following{/other_user}","gists_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/gists{/gist_id}","starred_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/subscriptions","organizations_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/orgs","repos_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/repos","events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/events{/privacy}","received_events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack","description":null,"fork":false,"url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack","forks_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/forks","keys_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/teams","hooks_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/hooks","issue_events_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues/events{/number}","events_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/events","assignees_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/assignees{/user}","branches_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/branches{/branch}","tags_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/tags","blobs_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/git/refs{/sha}","trees_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/statuses/{sha}","languages_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/languages","stargazers_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/stargazers","contributors_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/contributors","subscribers_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/subscribers","subscription_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/subscription","commits_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/commits{/sha}","git_commits_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/git/commits{/sha}","comments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/comments{/number}","issue_comment_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues/comments{/number}","contents_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/contents/{+path}","compare_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/merges","archive_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/downloads","issues_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues{/number}","pulls_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls{/number}","milestones_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/milestones{/number}","notifications_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/labels{/name}","releases_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/releases{/id}","deployments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/deployments","created_at":"2017-01-30T23:29:05Z","updated_at":"2017-02-05T18:25:38Z","pushed_at":"2017-02-08T23:42:22Z","git_url":"git://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack.git","ssh_url":"git@github.com:codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack.git","clone_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack.git","svn_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack","homepage":null,"size":10101,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":7,"forks":11,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13"},"html":{"href":"https://github.com/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pull/13"},"issue":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues/13"},"comments":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-21-intro-to-angular-webpack/statuses/5482a692f93d47bd7e84557c5e9264af6997c831"}}}}
{"actor":{"display_login":"sjschmidt44"}}