{"action":"created","issue":{"url":"https://api.github.com/repos/evanmrose/mean-best-practices/issues/1","labels_url":"https://api.github.com/repos/evanmrose/mean-best-practices/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/evanmrose/mean-best-practices/issues/1/comments","events_url":"https://api.github.com/repos/evanmrose/mean-best-practices/issues/1/events","html_url":"https://github.com/evanmrose/mean-best-practices/issues/1","id":95042703,"number":1,"title":"Use ng-annotate for less painful DI management","user":{"login":"daviskoh","id":5395403,"avatar_url":"https://avatars.githubusercontent.com/u/5395403?v=3","gravatar_id":"","url":"https://api.github.com/users/daviskoh","html_url":"https://github.com/daviskoh","followers_url":"https://api.github.com/users/daviskoh/followers","following_url":"https://api.github.com/users/daviskoh/following{/other_user}","gists_url":"https://api.github.com/users/daviskoh/gists{/gist_id}","starred_url":"https://api.github.com/users/daviskoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviskoh/subscriptions","organizations_url":"https://api.github.com/users/daviskoh/orgs","repos_url":"https://api.github.com/users/daviskoh/repos","events_url":"https://api.github.com/users/daviskoh/events{/privacy}","received_events_url":"https://api.github.com/users/daviskoh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-14T21:15:19Z","updated_at":"2015-07-15T15:45:41Z","closed_at":null,"body":"Note sure if this will clash at all w/ browserify's DI as I'm not too familiar w/ the tool but...\r\n\r\nProposal: instead of typing out essentially 2 lists of Angular dependencies (string array elements & func args), use [ng-annotate](https://github.com/olov/ng-annotate)\r\n\r\nGulp Plugin: https://github.com/Kagami/gulp-ng-annotate\r\n\r\nBasically ([from this section](https://github.com/evanmrose/mean-best-practices#dependency-injection)):\r\n\r\n```\r\nmyApp.controller('nameOfController', ['$scope', '$timeout', 'nameOfService', function($scope, $timeout, nameOfService){\r\n   ...your code here...\r\n}]);\r\n```\r\n\r\nwould change to\r\n\r\n```\r\n// @ngInject\r\nfunction nameOfController($scope, $timeout, nameOfService) {\r\n    ...your code here...\r\n}\r\nmyApp.controller('nameOfController', nameOfController);\r\n```\r\n\r\nThis also has the added benefit that nameOfController is a named func and would appear as such in the stack traces for any errors. "},"comment":{"url":"https://api.github.com/repos/evanmrose/mean-best-practices/issues/comments/121657296","html_url":"https://github.com/evanmrose/mean-best-practices/issues/1#issuecomment-121657296","issue_url":"https://api.github.com/repos/evanmrose/mean-best-practices/issues/1","id":121657296,"user":{"login":"evanmrose","id":833570,"avatar_url":"https://avatars.githubusercontent.com/u/833570?v=3","gravatar_id":"","url":"https://api.github.com/users/evanmrose","html_url":"https://github.com/evanmrose","followers_url":"https://api.github.com/users/evanmrose/followers","following_url":"https://api.github.com/users/evanmrose/following{/other_user}","gists_url":"https://api.github.com/users/evanmrose/gists{/gist_id}","starred_url":"https://api.github.com/users/evanmrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanmrose/subscriptions","organizations_url":"https://api.github.com/users/evanmrose/orgs","repos_url":"https://api.github.com/users/evanmrose/repos","events_url":"https://api.github.com/users/evanmrose/events{/privacy}","received_events_url":"https://api.github.com/users/evanmrose/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T15:45:41Z","updated_at":"2015-07-15T15:45:41Z","body":"Good call. I'm using it for Tenxify and it works just fine w Browserify. Pls submit a pull req"}}