【发布时间】:2020-04-26 19:35:35
【问题描述】:
我有以下要扩展的类。
export class AngularComponent {
constructor(
private r: Renderer2,
private editorService: AngularEditorService,
@Inject(DOCUMENT) private doc: any,
private sanitizer: DomSanitizer,
private cdRef: ChangeDetectorRef,
@Attribute("tabindex") defaultTabIndex: string,
@Attribute("autofocus") private autoFocus: any
)
}
所以我创建了以下类:
export class EnhancedComponent extends AngularComponent{
constructor(private r: Renderer2, private editorService: AngularEditorService){
super(r,editorService, ...)
}
}
但是我不知道如何传递其他依赖项
@Inject(DOCUMENT) private doc: any,
@Attribute("tabindex") defaultTabIndex: string,
@Attribute("autofocus") private autoFocus: any
感谢您的帮助
【问题讨论】:
标签: angular oop dependencies extends