1:寫成這樣
export class a類 extends b類 implements OnInit {
}
2:在引入服務依賴的時候寫成這樣
constructor(public technicalProductsService: TechnicalProductsService) {
super(technicalProductsService);
}
3:b類的屬性在a類重新定義的時候應該在a類的constructor函數裏面使用this改寫
constructor(public technicalProductsService: TechnicalProductsService) {
super(technicalProductsService);
this.articleClassify = 4;
}