{"action":"created","issue":{"url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/635","labels_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/635/comments","events_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/635/events","html_url":"https://github.com/Swiip/generator-gulp-angular/pull/635","id":90838078,"number":635,"title":"Changed TypeScript index.module classes to functions","user":{"login":"mikesigs","id":811177,"avatar_url":"https://avatars.githubusercontent.com/u/811177?v=3","gravatar_id":"","url":"https://api.github.com/users/mikesigs","html_url":"https://github.com/mikesigs","followers_url":"https://api.github.com/users/mikesigs/followers","following_url":"https://api.github.com/users/mikesigs/following{/other_user}","gists_url":"https://api.github.com/users/mikesigs/gists{/gist_id}","starred_url":"https://api.github.com/users/mikesigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikesigs/subscriptions","organizations_url":"https://api.github.com/users/mikesigs/orgs","repos_url":"https://api.github.com/users/mikesigs/repos","events_url":"https://api.github.com/users/mikesigs/events{/privacy}","received_events_url":"https://api.github.com/users/mikesigs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-25T03:10:48Z","updated_at":"2015-06-25T14:14:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Swiip/generator-gulp-angular/pulls/635","html_url":"https://github.com/Swiip/generator-gulp-angular/pull/635","diff_url":"https://github.com/Swiip/generator-gulp-angular/pull/635.diff","patch_url":"https://github.com/Swiip/generator-gulp-angular/pull/635.patch"},"body":"This fixes #629.\r\n\r\nindex.ts was split into several files: index.module.ts, index.config.ts, index.route.ts, and index.run.ts. The last three files in that list each defined classes to encapsulate their functionality. However, in the index.module.ts, the classes were being passed to the angular module.config() and module.run(), but Angular doesn't call these functions with the new keyword, meaning they should just be functions. Having them as classes didn't actually break anything, but when trying to use `this` in the constructor, you got `undefined` (in strict mode) or `window` otherwise. Changing these implementations to just `export function` will prevent devs from writing code as though it's a constructor."},"comment":{"url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/comments/115272049","html_url":"https://github.com/Swiip/generator-gulp-angular/pull/635#issuecomment-115272049","issue_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/635","id":115272049,"user":{"login":"mikesigs","id":811177,"avatar_url":"https://avatars.githubusercontent.com/u/811177?v=3","gravatar_id":"","url":"https://api.github.com/users/mikesigs","html_url":"https://github.com/mikesigs","followers_url":"https://api.github.com/users/mikesigs/followers","following_url":"https://api.github.com/users/mikesigs/following{/other_user}","gists_url":"https://api.github.com/users/mikesigs/gists{/gist_id}","starred_url":"https://api.github.com/users/mikesigs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikesigs/subscriptions","organizations_url":"https://api.github.com/users/mikesigs/orgs","repos_url":"https://api.github.com/users/mikesigs/repos","events_url":"https://api.github.com/users/mikesigs/events{/privacy}","received_events_url":"https://api.github.com/users/mikesigs/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T14:14:02Z","updated_at":"2015-06-25T14:14:02Z","body":"I lower-cased the function names.\r\n\r\n@zckrs No, I'm afraid that's not something I've tackled yet. But I agree, there aren't too many great examples out there."}}