{"action":"closed","issue":{"url":"https://api.github.com/repos/angular/angular/issues/14591","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/14591/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/14591/comments","events_url":"https://api.github.com/repos/angular/angular/issues/14591/events","html_url":"https://github.com/angular/angular/issues/14591","id":208744574,"number":14591,"title":"Component doesn't inherit service from superclass in 2.4.7","user":{"login":"doender","id":4175777,"avatar_url":"https://avatars3.githubusercontent.com/u/4175777?v=3","gravatar_id":"","url":"https://api.github.com/users/doender","html_url":"https://github.com/doender","followers_url":"https://api.github.com/users/doender/followers","following_url":"https://api.github.com/users/doender/following{/other_user}","gists_url":"https://api.github.com/users/doender/gists{/gist_id}","starred_url":"https://api.github.com/users/doender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doender/subscriptions","organizations_url":"https://api.github.com/users/doender/orgs","repos_url":"https://api.github.com/users/doender/repos","events_url":"https://api.github.com/users/doender/events{/privacy}","received_events_url":"https://api.github.com/users/doender/received_events","type":"User","site_admin":false},"labels":[{"id":375501288,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core%20&%20compiler","name":"comp: core & compiler","color":"c7def8","default":false},{"id":317126348,"url":"https://api.github.com/repos/angular/angular/labels/flag:%20can%20be%20closed?","name":"flag: can be closed?","color":"bfdadc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-02-19T20:39:57Z","updated_at":"2017-04-10T21:54:44Z","closed_at":"2017-04-10T21:54:44Z","body":"In Angular 2.4.4, inheriting from a superclass component worked, as in the following example:\r\n\r\n```\r\n@Component({\r\n    selector: 'base-component',\r\n    templateUrl: 'base-component.html',\r\n})\r\nexport class BaseComponent {\r\n    constructor(private service:MyService) {\r\n        console.log(\"Service:\", service);\r\n    }\r\n} \r\n\r\n@Component({\r\n   selector: 'child-component',\r\n    templateUrl: 'child-component.html',\r\n})\r\nexport class ChildComponent extends BaseComponent {\r\n}\r\n\r\n```\r\n\r\nHowever, in Angular 2.4.7, the service now is undefined when instantiating `<child-component>`.\r\n"}}
{"actor":{"display_login":"doender"}}