export class SonComponent extends ParentComponent {
public say() {
console.info('hello!my parent is ' + super.getName());
}
}
export class ParentComponent {
public getName() {
return this.getFirstName() + this.getLastName(); // <--- exception, core.js:4002 ERROR TypeError: this.getFirstName is not a function
}
public getFirstName() {
return 'wu';
}
public getLastName() {
return 'victor';
}
异常,core.js:4002 错误类型错误:this.getFirstName 不是函数
为什么?