{"action":"created","comment":{"url":"https://api.github.com/repos/meanjs/mean/pulls/comments/56753964","id":56753964,"diff_hunk":"@@ -1,80 +1,45 @@\n-'use strict';\n+(function (app) {\n+  'use strict';\n \n-// Start by defining the main module and adding the module dependencies\n-angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);\n+  // Start by defining the main module and adding the module dependencies\n+  angular\n+    .module(app.applicationModuleName, app.applicationModuleVendorDependencies);\n \n-// Setting HTML5 Location Mode\n-angular.module(ApplicationConfiguration.applicationModuleName).config(['$locationProvider', '$httpProvider',\n-  function ($locationProvider, $httpProvider) {\n+  // Setting HTML5 Location Mode\n+  angular\n+    .module(app.applicationModuleName)\n+    .config(bootstrapConfig);\n+\n+  function bootstrapConfig($locationProvider, $httpProvider) {\n     $locationProvider.html5Mode(true).hashPrefix('!');\n \n     $httpProvider.interceptors.push('authInterceptor');\n   }\n-]);\n-\n-angular.module(ApplicationConfiguration.applicationModuleName).run(function ($rootScope, $state, Authentication) {\n-\n-  // Check authentication before changing state\n-  $rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {\n-    if (toState.data && toState.data.roles && toState.data.roles.length > 0) {\n-      var allowed = false;\n-      toState.data.roles.forEach(function (role) {\n-        if ((role === 'guest') || (Authentication.user && Authentication.user.roles !== undefined && Authentication.user.roles.indexOf(role) !== -1)) {\n-          allowed = true;\n-          return true;\n-        }\n-      });\n \n-      if (!allowed) {\n-        event.preventDefault();\n-        if (Authentication.user !== undefined && typeof Authentication.user === 'object') {\n-          $state.go('forbidden');\n-        } else {\n-          $state.go('authentication.signin').then(function () {\n-            storePreviousState(toState, toParams);\n-          });\n-        }\n+  bootstrapConfig.$inject = ['$locationProvider', '$httpProvider'];\n+\n+  // Then define the init function for starting up the application\n+  angular.element(document).ready(init);","path":"modules/core/client/app/init.js","position":51,"original_position":51,"commit_id":"4db1e19439f33709eb3cb67de3b643380b7bef1c","original_commit_id":"4db1e19439f33709eb3cb67de3b643380b7bef1c","user":{"login":"rhutchison","id":1460261,"avatar_url":"https://avatars.githubusercontent.com/u/1460261?v=3","gravatar_id":"","url":"https://api.github.com/users/rhutchison","html_url":"https://github.com/rhutchison","followers_url":"https://api.github.com/users/rhutchison/followers","following_url":"https://api.github.com/users/rhutchison/following{/other_user}","gists_url":"https://api.github.com/users/rhutchison/gists{/gist_id}","starred_url":"https://api.github.com/users/rhutchison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhutchison/subscriptions","organizations_url":"https://api.github.com/users/rhutchison/orgs","repos_url":"https://api.github.com/users/rhutchison/repos","events_url":"https://api.github.com/users/rhutchison/events{/privacy}","received_events_url":"https://api.github.com/users/rhutchison/received_events","type":"User","site_admin":false},"body":"Is `angular.element($document).ready(init);` even valid?","created_at":"2016-03-19T19:36:35Z","updated_at":"2016-03-19T19:36:35Z","html_url":"https://github.com/meanjs/mean/pull/1202#discussion_r56753964","pull_request_url":"https://api.github.com/repos/meanjs/mean/pulls/1202","_links":{"self":{"href":"https://api.github.com/repos/meanjs/mean/pulls/comments/56753964"},"html":{"href":"https://github.com/meanjs/mean/pull/1202#discussion_r56753964"},"pull_request":{"href":"https://api.github.com/repos/meanjs/mean/pulls/1202"}}},"pull_request":{"url":"https://api.github.com/repos/meanjs/mean/pulls/1202","id":58992944,"html_url":"https://github.com/meanjs/mean/pull/1202","diff_url":"https://github.com/meanjs/mean/pull/1202.diff","patch_url":"https://github.com/meanjs/mean/pull/1202.patch","issue_url":"https://api.github.com/repos/meanjs/mean/issues/1202","number":1202,"state":"open","locked":false,"title":"feat(core): Modify core module to implement style guidelines.","user":{"login":"rhutchison","id":1460261,"avatar_url":"https://avatars.githubusercontent.com/u/1460261?v=3","gravatar_id":"","url":"https://api.github.com/users/rhutchison","html_url":"https://github.com/rhutchison","followers_url":"https://api.github.com/users/rhutchison/followers","following_url":"https://api.github.com/users/rhutchison/following{/other_user}","gists_url":"https://api.github.com/users/rhutchison/gists{/gist_id}","starred_url":"https://api.github.com/users/rhutchison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhutchison/subscriptions","organizations_url":"https://api.github.com/users/rhutchison/orgs","repos_url":"https://api.github.com/users/rhutchison/repos","events_url":"https://api.github.com/users/rhutchison/events{/privacy}","received_events_url":"https://api.github.com/users/rhutchison/received_events","type":"User","site_admin":false},"body":"Update the core module to implement the style guidelines.\r\nReduce size of init.js - moved filter logic out to it's own config.\r\nRename Menus to menuService\r\n\r\nRef: #657\r\nRef: #943","created_at":"2016-02-11T05:23:09Z","updated_at":"2016-03-19T19:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a00cb6bb87cd602598b19ba26b44c9965a0e49c5","assignee":{"login":"mleanos","id":5613734,"avatar_url":"https://avatars.githubusercontent.com/u/5613734?v=3","gravatar_id":"","url":"https://api.github.com/users/mleanos","html_url":"https://github.com/mleanos","followers_url":"https://api.github.com/users/mleanos/followers","following_url":"https://api.github.com/users/mleanos/following{/other_user}","gists_url":"https://api.github.com/users/mleanos/gists{/gist_id}","starred_url":"https://api.github.com/users/mleanos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mleanos/subscriptions","organizations_url":"https://api.github.com/users/mleanos/orgs","repos_url":"https://api.github.com/users/mleanos/repos","events_url":"https://api.github.com/users/mleanos/events{/privacy}","received_events_url":"https://api.github.com/users/mleanos/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/meanjs/mean/milestones/6","html_url":"https://github.com/meanjs/mean/milestones/0.5.0","labels_url":"https://api.github.com/repos/meanjs/mean/milestones/6/labels","id":1213421,"number":6,"title":"0.5.0","description":"","creator":{"login":"ilanbiala","id":3695164,"avatar_url":"https://avatars.githubusercontent.com/u/3695164?v=3","gravatar_id":"","url":"https://api.github.com/users/ilanbiala","html_url":"https://github.com/ilanbiala","followers_url":"https://api.github.com/users/ilanbiala/followers","following_url":"https://api.github.com/users/ilanbiala/following{/other_user}","gists_url":"https://api.github.com/users/ilanbiala/gists{/gist_id}","starred_url":"https://api.github.com/users/ilanbiala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilanbiala/subscriptions","organizations_url":"https://api.github.com/users/ilanbiala/orgs","repos_url":"https://api.github.com/users/ilanbiala/repos","events_url":"https://api.github.com/users/ilanbiala/events{/privacy}","received_events_url":"https://api.github.com/users/ilanbiala/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":127,"state":"open","created_at":"2015-07-17T18:54:42Z","updated_at":"2016-03-19T18:38:05Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/meanjs/mean/pulls/1202/commits","review_comments_url":"https://api.github.com/repos/meanjs/mean/pulls/1202/comments","review_comment_url":"https://api.github.com/repos/meanjs/mean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meanjs/mean/issues/1202/comments","statuses_url":"https://api.github.com/repos/meanjs/mean/statuses/4db1e19439f33709eb3cb67de3b643380b7bef1c","head":{"label":"Gym:core-styleguide","ref":"core-styleguide","sha":"4db1e19439f33709eb3cb67de3b643380b7bef1c","user":{"login":"Gym","id":724013,"avatar_url":"https://avatars.githubusercontent.com/u/724013?v=3","gravatar_id":"","url":"https://api.github.com/users/Gym","html_url":"https://github.com/Gym","followers_url":"https://api.github.com/users/Gym/followers","following_url":"https://api.github.com/users/Gym/following{/other_user}","gists_url":"https://api.github.com/users/Gym/gists{/gist_id}","starred_url":"https://api.github.com/users/Gym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gym/subscriptions","organizations_url":"https://api.github.com/users/Gym/orgs","repos_url":"https://api.github.com/users/Gym/repos","events_url":"https://api.github.com/users/Gym/events{/privacy}","received_events_url":"https://api.github.com/users/Gym/received_events","type":"Organization","site_admin":false},"repo":{"id":24781262,"name":"mean","full_name":"Gym/mean","owner":{"login":"Gym","id":724013,"avatar_url":"https://avatars.githubusercontent.com/u/724013?v=3","gravatar_id":"","url":"https://api.github.com/users/Gym","html_url":"https://github.com/Gym","followers_url":"https://api.github.com/users/Gym/followers","following_url":"https://api.github.com/users/Gym/following{/other_user}","gists_url":"https://api.github.com/users/Gym/gists{/gist_id}","starred_url":"https://api.github.com/users/Gym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gym/subscriptions","organizations_url":"https://api.github.com/users/Gym/orgs","repos_url":"https://api.github.com/users/Gym/repos","events_url":"https://api.github.com/users/Gym/events{/privacy}","received_events_url":"https://api.github.com/users/Gym/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Gym/mean","description":"MEAN.JS - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js From Creators of MEAN.IO - ","fork":true,"url":"https://api.github.com/repos/Gym/mean","forks_url":"https://api.github.com/repos/Gym/mean/forks","keys_url":"https://api.github.com/repos/Gym/mean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gym/mean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gym/mean/teams","hooks_url":"https://api.github.com/repos/Gym/mean/hooks","issue_events_url":"https://api.github.com/repos/Gym/mean/issues/events{/number}","events_url":"https://api.github.com/repos/Gym/mean/events","assignees_url":"https://api.github.com/repos/Gym/mean/assignees{/user}","branches_url":"https://api.github.com/repos/Gym/mean/branches{/branch}","tags_url":"https://api.github.com/repos/Gym/mean/tags","blobs_url":"https://api.github.com/repos/Gym/mean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gym/mean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gym/mean/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gym/mean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gym/mean/statuses/{sha}","languages_url":"https://api.github.com/repos/Gym/mean/languages","stargazers_url":"https://api.github.com/repos/Gym/mean/stargazers","contributors_url":"https://api.github.com/repos/Gym/mean/contributors","subscribers_url":"https://api.github.com/repos/Gym/mean/subscribers","subscription_url":"https://api.github.com/repos/Gym/mean/subscription","commits_url":"https://api.github.com/repos/Gym/mean/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gym/mean/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gym/mean/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gym/mean/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gym/mean/contents/{+path}","compare_url":"https://api.github.com/repos/Gym/mean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gym/mean/merges","archive_url":"https://api.github.com/repos/Gym/mean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gym/mean/downloads","issues_url":"https://api.github.com/repos/Gym/mean/issues{/number}","pulls_url":"https://api.github.com/repos/Gym/mean/pulls{/number}","milestones_url":"https://api.github.com/repos/Gym/mean/milestones{/number}","notifications_url":"https://api.github.com/repos/Gym/mean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gym/mean/labels{/name}","releases_url":"https://api.github.com/repos/Gym/mean/releases{/id}","deployments_url":"https://api.github.com/repos/Gym/mean/deployments","created_at":"2014-10-04T03:55:17Z","updated_at":"2015-09-17T17:39:46Z","pushed_at":"2016-03-18T23:57:45Z","git_url":"git://github.com/Gym/mean.git","ssh_url":"git@github.com:Gym/mean.git","clone_url":"https://github.com/Gym/mean.git","svn_url":"https://github.com/Gym/mean","homepage":"meanjs.org","size":4228,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"meanjs:master","ref":"master","sha":"bc3d536ed25815198c805fa1d5e3f71c61e3fd79","user":{"login":"meanjs","id":6232122,"avatar_url":"https://avatars.githubusercontent.com/u/6232122?v=3","gravatar_id":"","url":"https://api.github.com/users/meanjs","html_url":"https://github.com/meanjs","followers_url":"https://api.github.com/users/meanjs/followers","following_url":"https://api.github.com/users/meanjs/following{/other_user}","gists_url":"https://api.github.com/users/meanjs/gists{/gist_id}","starred_url":"https://api.github.com/users/meanjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meanjs/subscriptions","organizations_url":"https://api.github.com/users/meanjs/orgs","repos_url":"https://api.github.com/users/meanjs/repos","events_url":"https://api.github.com/users/meanjs/events{/privacy}","received_events_url":"https://api.github.com/users/meanjs/received_events","type":"Organization","site_admin":false},"repo":{"id":15508537,"name":"mean","full_name":"meanjs/mean","owner":{"login":"meanjs","id":6232122,"avatar_url":"https://avatars.githubusercontent.com/u/6232122?v=3","gravatar_id":"","url":"https://api.github.com/users/meanjs","html_url":"https://github.com/meanjs","followers_url":"https://api.github.com/users/meanjs/followers","following_url":"https://api.github.com/users/meanjs/following{/other_user}","gists_url":"https://api.github.com/users/meanjs/gists{/gist_id}","starred_url":"https://api.github.com/users/meanjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meanjs/subscriptions","organizations_url":"https://api.github.com/users/meanjs/orgs","repos_url":"https://api.github.com/users/meanjs/repos","events_url":"https://api.github.com/users/meanjs/events{/privacy}","received_events_url":"https://api.github.com/users/meanjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meanjs/mean","description":"MEAN.JS - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js - ","fork":false,"url":"https://api.github.com/repos/meanjs/mean","forks_url":"https://api.github.com/repos/meanjs/mean/forks","keys_url":"https://api.github.com/repos/meanjs/mean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meanjs/mean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meanjs/mean/teams","hooks_url":"https://api.github.com/repos/meanjs/mean/hooks","issue_events_url":"https://api.github.com/repos/meanjs/mean/issues/events{/number}","events_url":"https://api.github.com/repos/meanjs/mean/events","assignees_url":"https://api.github.com/repos/meanjs/mean/assignees{/user}","branches_url":"https://api.github.com/repos/meanjs/mean/branches{/branch}","tags_url":"https://api.github.com/repos/meanjs/mean/tags","blobs_url":"https://api.github.com/repos/meanjs/mean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meanjs/mean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meanjs/mean/git/refs{/sha}","trees_url":"https://api.github.com/repos/meanjs/mean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meanjs/mean/statuses/{sha}","languages_url":"https://api.github.com/repos/meanjs/mean/languages","stargazers_url":"https://api.github.com/repos/meanjs/mean/stargazers","contributors_url":"https://api.github.com/repos/meanjs/mean/contributors","subscribers_url":"https://api.github.com/repos/meanjs/mean/subscribers","subscription_url":"https://api.github.com/repos/meanjs/mean/subscription","commits_url":"https://api.github.com/repos/meanjs/mean/commits{/sha}","git_commits_url":"https://api.github.com/repos/meanjs/mean/git/commits{/sha}","comments_url":"https://api.github.com/repos/meanjs/mean/comments{/number}","issue_comment_url":"https://api.github.com/repos/meanjs/mean/issues/comments{/number}","contents_url":"https://api.github.com/repos/meanjs/mean/contents/{+path}","compare_url":"https://api.github.com/repos/meanjs/mean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meanjs/mean/merges","archive_url":"https://api.github.com/repos/meanjs/mean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meanjs/mean/downloads","issues_url":"https://api.github.com/repos/meanjs/mean/issues{/number}","pulls_url":"https://api.github.com/repos/meanjs/mean/pulls{/number}","milestones_url":"https://api.github.com/repos/meanjs/mean/milestones{/number}","notifications_url":"https://api.github.com/repos/meanjs/mean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meanjs/mean/labels{/name}","releases_url":"https://api.github.com/repos/meanjs/mean/releases{/id}","deployments_url":"https://api.github.com/repos/meanjs/mean/deployments","created_at":"2013-12-29T13:01:15Z","updated_at":"2016-03-19T19:08:22Z","pushed_at":"2016-03-19T18:27:55Z","git_url":"git://github.com/meanjs/mean.git","ssh_url":"git@github.com:meanjs/mean.git","clone_url":"https://github.com/meanjs/mean.git","svn_url":"https://github.com/meanjs/mean","homepage":"http://meanjs.org","size":5289,"stargazers_count":3217,"watchers_count":3217,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1233,"mirror_url":null,"open_issues_count":76,"forks":1233,"open_issues":76,"watchers":3217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meanjs/mean/pulls/1202"},"html":{"href":"https://github.com/meanjs/mean/pull/1202"},"issue":{"href":"https://api.github.com/repos/meanjs/mean/issues/1202"},"comments":{"href":"https://api.github.com/repos/meanjs/mean/issues/1202/comments"},"review_comments":{"href":"https://api.github.com/repos/meanjs/mean/pulls/1202/comments"},"review_comment":{"href":"https://api.github.com/repos/meanjs/mean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meanjs/mean/pulls/1202/commits"},"statuses":{"href":"https://api.github.com/repos/meanjs/mean/statuses/4db1e19439f33709eb3cb67de3b643380b7bef1c"}}}}