Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

class Base {
static get parameters() {
return [[Service]];
}

constructor(service) {
this.service = service
}
}

class Child extends Base {
load() {
return this.service.load()
}
}

@Component(...)
class App {
static get parameters() {
return [[Child]]
}

constructor(service) {
this.service = service
}

ngOnInit() {
this.service.load()
}
}

Fails with Cannot read property 'load' of undefined

Expected behavior

Service is successfully injected into Child class and no error is thrown

Minimal reproduction of the problem with instructions

Reproduction is in Current behavior. I did some investigation and found out that babel generate this for class without constructor:

function Child() {
babelHelpers.classCallCheck(this, Child);
return babelHelpers.possibleConstructorReturn(this, (Child.__proto__ || Object.getPrototypeOf(Child)).apply(this, arguments));
}

And this is the regexp which checks whether class doesn't have own constructor:

var DELEGATE_CTOR = /^function\s+\S+\(\)\s*{\s*("use strict";)?\s*(return\s+)?\S+\.apply\(this,\s*arguments\)/;

What is the motivation / use case for changing the behavior?

It's useful when injected services from parent class can be injected into Child by default without additional coding

Please tell us about your environment:

Angular version: 2.0.X

2.4.8

Browser: all

Language: ES6/7

Node (for AoT issues): node --version =

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

(note: this is the bug I wrongly reported in my first report #14934 , but now I have successed in reproducing it properly)

My main module (foo in the example) contains a feature module (bar in the example), this feature module contains a service (ConfigurationService in the example) and a component (DisplayComponent in the example) which uses ConfigurationService. The component is exported by the bar module.

In the foo module, we inherit from this component to create the CustomDisplay component.

The application works fine, but the tests fail with the following error:

Cannot read property 'getStuff' of undefined

It happens because the ConfigurationService is not injected in the component.

Expected behavior

Tests should pass.

Minimal reproduction of the problem with instructions

Here is an example generated with Angular CLI 1.0.0.rc1:

https://github.com/ebrehault/ng-feature-module-example

Just run:

ng test

What is the motivation / use case for changing the behavior?

The motication is to be able to write tests :)

Please tell us about your environment:

Ubuntu 16.10, npm 3.8.6

Angular version: 2.4.9

Browser: Chrome (which is the browser used by karma)

Language: TypeScript 2.0.10

Node (for AoT issues): node --version = 6.1.0