I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Assume we have base class, mixin and component class:
class Base implements OnInit {
constructor(){}
ngOnInit():void {}
}
type Constructor<T> = new(...args: any[]) => T;
function Tagged<T extends Constructor<{}>>(base: T) {
return class extends base {
value: string;
constructor(...args: any[]) {
super(...args);
this.value= "test";
}
}
}
export class Component extends Tagged(Base) {
public item:any;
constructor() {
super();
}
}
Component's ngOnInit listener will not be called in AOT.
Workaround:
export class Component extends Tagged(Base) {
public item:any;
constructor() {
super();
}
ngOnInit():void {
super.ngOnInit();
}
}
Expected behavior
ngOnInit should be called.
Environment
Angular version: 4.4.0-RC.0
TypeScript: 2.4.2
I'm submitting a...
Current behavior
Assume we have base class, mixin and component class:
Component's
ngOnInitlistener will not be called in AOT.Workaround:
Expected behavior
ngOnInitshould be called.Environment