{"action":"created","issue":{"url":"https://api.github.com/repos/ternjs/tern/issues/847","repository_url":"https://api.github.com/repos/ternjs/tern","labels_url":"https://api.github.com/repos/ternjs/tern/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/ternjs/tern/issues/847/comments","events_url":"https://api.github.com/repos/ternjs/tern/issues/847/events","html_url":"https://github.com/ternjs/tern/issues/847","id":189189077,"number":847,"title":"Custom angular factories not populating","user":{"login":"tandrewnichols","id":2755760,"avatar_url":"https://avatars.githubusercontent.com/u/2755760?v=3","gravatar_id":"","url":"https://api.github.com/users/tandrewnichols","html_url":"https://github.com/tandrewnichols","followers_url":"https://api.github.com/users/tandrewnichols/followers","following_url":"https://api.github.com/users/tandrewnichols/following{/other_user}","gists_url":"https://api.github.com/users/tandrewnichols/gists{/gist_id}","starred_url":"https://api.github.com/users/tandrewnichols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tandrewnichols/subscriptions","organizations_url":"https://api.github.com/users/tandrewnichols/orgs","repos_url":"https://api.github.com/users/tandrewnichols/repos","events_url":"https://api.github.com/users/tandrewnichols/events{/privacy}","received_events_url":"https://api.github.com/users/tandrewnichols/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-14T18:31:52Z","updated_at":"2016-11-14T19:53:39Z","closed_at":"2016-11-14T19:14:34Z","body":"I'm using YouCompleteMe in conjunction with tern_for_vim to get code completion. I have the following `.tern-project` file in the root of my project: \r\n\r\n```\r\n{\r\n  \"libs\": [\r\n    \"browser\",\r\n    \"jquery\",\r\n    \"underscore\"\r\n  ],\r\n  \"plugins\": {\r\n    \"node\": {},\r\n    \"modules\": {},\r\n    \"angular\": \"./client/app/js\"\r\n  }\r\n}\r\n```\r\n\r\nThis _sort of_ works. If I'm editing an angular file in `client/app/js/` that injects a built-in service, like `$http` for example, I get autocompletion after `$http.` (e.g. `post`, `delete`, etc.). But if I inject a custom Service, I get nothing. Example:\r\n\r\n```\r\n// Factory in client/app/js/services/foo.js\r\nangular.module('app').factory('Foo', function() {\r\n  var service = {\r\n    fn: function() {}\r\n  };\r\n  return service;\r\n});\r\n\r\n// Controller that uses Foo in client/app/js/controllers/bar.js\r\nangular.module('app').controller('Bar', function($scope, $http, Foo) {\r\n  $scope.| // <-- I get completion for this based on what's in this file, but not built in things like $eval\r\n  $http.| // <-- I get full completion for this\r\n  Foo.| // <-- I get nothing here\r\n});\r\n```\r\n\r\nAm I doing something wrong or is something functioning in an unexpected way?"},"comment":{"url":"https://api.github.com/repos/ternjs/tern/issues/comments/260443463","html_url":"https://github.com/ternjs/tern/issues/847#issuecomment-260443463","issue_url":"https://api.github.com/repos/ternjs/tern/issues/847","id":260443463,"user":{"login":"tandrewnichols","id":2755760,"avatar_url":"https://avatars.githubusercontent.com/u/2755760?v=3","gravatar_id":"","url":"https://api.github.com/users/tandrewnichols","html_url":"https://github.com/tandrewnichols","followers_url":"https://api.github.com/users/tandrewnichols/followers","following_url":"https://api.github.com/users/tandrewnichols/following{/other_user}","gists_url":"https://api.github.com/users/tandrewnichols/gists{/gist_id}","starred_url":"https://api.github.com/users/tandrewnichols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tandrewnichols/subscriptions","organizations_url":"https://api.github.com/users/tandrewnichols/orgs","repos_url":"https://api.github.com/users/tandrewnichols/repos","events_url":"https://api.github.com/users/tandrewnichols/events{/privacy}","received_events_url":"https://api.github.com/users/tandrewnichols/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T19:53:39Z","updated_at":"2016-11-14T19:53:39Z","body":"Not trying to drag this out. I _do_ understand the meaning of \"not actively maintained.\" There _are_ references to `factory` in the angular plugin, like [this one](https://github.com/ternjs/tern/blob/master/plugin/angular.js#L821). "}}
{"actor":{"display_login":"tandrewnichols"}}