{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13510","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13510/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13510/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13510/events","html_url":"https://github.com/angular/angular.js/issues/13510","id":121672931,"number":13510,"title":"fix($controller): support instantiation of ES6 classes","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/branch:%201.5.x","name":"branch: 1.5.x","color":"207de5"},{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20di","name":"component: di","color":"d4c5f9"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20investigation","name":"needs: investigation","color":"444444"},{"url":"https://api.github.com/repos/angular/angular.js/labels/severity:%20broken%20expected%20use","name":"severity: broken expected use","color":"fbda00"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20bug","name":"type: bug","color":"000000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/112","html_url":"https://github.com/angular/angular.js/milestones/1.5.0-rc.1","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/112/labels","id":1451924,"number":112,"title":"1.5.0-rc.1","description":"","creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":4,"state":"open","created_at":"2015-12-09T14:08:59Z","updated_at":"2015-12-15T13:47:00Z","due_on":"2015-12-16T00:00:00Z","closed_at":null},"comments":14,"created_at":"2015-12-11T09:44:49Z","updated_at":"2015-12-15T18:20:59Z","closed_at":null,"body":"See https://github.com/angular/angular.js/pull/12598#issuecomment-163738832\r\n\r\nThe `$controller` service has two paths for creating instances of a controller. In the `later == true` path we are not using `$injector.instantiate`, which has recently been fixed to support ES6 classes.\r\n\r\nWe ought to refactor `$controller` to use `$injector.instantiate` in both paths for consistency, if this is possible."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/164847095","html_url":"https://github.com/angular/angular.js/issues/13510#issuecomment-164847095","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13510","id":164847095,"user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:20:59Z","updated_at":"2015-12-15T18:20:59Z","body":"Currently we don't see a way to allow the constructor function of a native ES6 class (i.e. not a transpiled class but a real class in a browser that supports it) to run against a previously defined instance.\r\n\r\nWhat we will be able to guarantee is that for real classes you will not get bindings during the constructor but they will be there by the time of the next digest."}}