{"action":"created","issue":{"url":"https://api.github.com/repos/rubenv/angular-gettext/issues/238","labels_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/238/comments","events_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/238/events","html_url":"https://github.com/rubenv/angular-gettext/issues/238","id":113827812,"number":238,"title":"loadRemote not exposing the response data","user":{"login":"crisbeto","id":4450522,"avatar_url":"https://avatars.githubusercontent.com/u/4450522?v=3","gravatar_id":"","url":"https://api.github.com/users/crisbeto","html_url":"https://github.com/crisbeto","followers_url":"https://api.github.com/users/crisbeto/followers","following_url":"https://api.github.com/users/crisbeto/following{/other_user}","gists_url":"https://api.github.com/users/crisbeto/gists{/gist_id}","starred_url":"https://api.github.com/users/crisbeto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crisbeto/subscriptions","organizations_url":"https://api.github.com/users/crisbeto/orgs","repos_url":"https://api.github.com/users/crisbeto/repos","events_url":"https://api.github.com/users/crisbeto/events{/privacy}","received_events_url":"https://api.github.com/users/crisbeto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-28T14:02:41Z","updated_at":"2015-10-28T14:06:07Z","closed_at":null,"body":"When trying to do something like this:\r\n\r\n```javascript\r\ngettextCatalog.loadRemote('something').then(function(response){\r\n  console.log(response);\r\n});\r\n```\r\n\r\nThe server response is `undefined`, because `loadRemote` returns the promise as `return $http.get(...).then()`. In order to be able to get the data, the response needs to return either the promise itself or return the `response` in the `then` handler. \r\n\r\nI've submitted a PR with the fix for this. The fix can be written shorter, but I went with this approach so it's a little bit more obvious what's going on."},"comment":{"url":"https://api.github.com/repos/rubenv/angular-gettext/issues/comments/151855889","html_url":"https://github.com/rubenv/angular-gettext/issues/238#issuecomment-151855889","issue_url":"https://api.github.com/repos/rubenv/angular-gettext/issues/238","id":151855889,"user":{"login":"rubenv","id":42904,"avatar_url":"https://avatars.githubusercontent.com/u/42904?v=3","gravatar_id":"","url":"https://api.github.com/users/rubenv","html_url":"https://github.com/rubenv","followers_url":"https://api.github.com/users/rubenv/followers","following_url":"https://api.github.com/users/rubenv/following{/other_user}","gists_url":"https://api.github.com/users/rubenv/gists{/gist_id}","starred_url":"https://api.github.com/users/rubenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubenv/subscriptions","organizations_url":"https://api.github.com/users/rubenv/orgs","repos_url":"https://api.github.com/users/rubenv/repos","events_url":"https://api.github.com/users/rubenv/events{/privacy}","received_events_url":"https://api.github.com/users/rubenv/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T14:06:07Z","updated_at":"2015-10-28T14:06:07Z","body":"Is there any reason why you'd ever want to do this?"}}