{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/12614","labels_url":"https://api.github.com/repos/angular/angular.js/issues/12614/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12614/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/12614/events","html_url":"https://github.com/angular/angular.js/issues/12614","id":101664812,"number":12614,"title":"$controller cannot instantiate ES6 classes","user":{"login":"trevorade","id":13050011,"avatar_url":"https://avatars.githubusercontent.com/u/13050011?v=3","gravatar_id":"","url":"https://api.github.com/users/trevorade","html_url":"https://github.com/trevorade","followers_url":"https://api.github.com/users/trevorade/followers","following_url":"https://api.github.com/users/trevorade/following{/other_user}","gists_url":"https://api.github.com/users/trevorade/gists{/gist_id}","starred_url":"https://api.github.com/users/trevorade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevorade/subscriptions","organizations_url":"https://api.github.com/users/trevorade/orgs","repos_url":"https://api.github.com/users/trevorade/repos","events_url":"https://api.github.com/users/trevorade/events{/privacy}","received_events_url":"https://api.github.com/users/trevorade/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20di","name":"component: di","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/27","html_url":"https://github.com/angular/angular.js/milestones/Backlog","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/27/labels","id":489171,"number":27,"title":"Backlog","description":"Holds the backlog of issues and pull requests that have been triaged.\r\n\r\nBefore assigning items to this milestone they should be labelled, at the very least with the correct \"type\" label (i.e. \"issue\", \"pr\", \"bug\", \"regression\", \"chore\", \"docs\", etc).  Preferably you should also check for duplicate issues/PRs, note CLA status and assign \"complexity\" and \"impact\" labels too.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":674,"closed_issues":1035,"state":"open","created_at":"2013-11-18T23:30:35Z","updated_at":"2015-11-19T13:38:02Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-08-18T14:10:06Z","updated_at":"2015-11-21T11:45:30Z","closed_at":null,"body":"ES6 classes can only be instantiated using `new`.  `$controller` uses `$injector` to instantiate the classes which even after this fix: https://github.com/angular/angular.js/pull/12598 uses fn.apply.\r\n\r\nIn particular, this should work when bindToController is used."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/158631969","html_url":"https://github.com/angular/angular.js/issues/12614#issuecomment-158631969","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12614","id":158631969,"user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"created_at":"2015-11-21T11:45:30Z","updated_at":"2015-11-21T11:45:30Z","body":"I think @mprobst's comment was about ES6 classes, not \"plain\" constructor functions.\r\n\r\n--\r\n> couldn't say for sure yet that there aren't local factors in the results I've seen\r\n\r\nI would be still curious to take a look at those examples, if you can post them in CodePen, Plnkr etc."}}