Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular Typescript:错误TS2377:派生类的构造函数必须包含“super”调用_Angular_Typescript_Inheritance_Constructor_Angular7 - Fatal编程技术网

Angular Typescript:错误TS2377:派生类的构造函数必须包含“super”调用

Angular Typescript:错误TS2377:派生类的构造函数必须包含“super”调用,angular,typescript,inheritance,constructor,angular7,Angular,Typescript,Inheritance,Constructor,Angular7,我正试图用进度条实现这个角度上传文件,但在我的代码中 export class UploadDocumentTemplateComponent extends FieldType {} 我有这一行,因为它我得到了这个错误 错误TS2377:派生类的构造函数必须包含“super”调用 如何解决此问题?仅在您需要的构造函数中 constructor() { super() } 就在你需要的时候 constructor() { super() } 这是你上传DocumentTempl

我正试图用进度条实现这个角度上传文件,但在我的代码中

export class UploadDocumentTemplateComponent extends FieldType {}
我有这一行,因为它我得到了这个错误

错误TS2377:派生类的构造函数必须包含“super”调用


如何解决此问题?

仅在您需要的构造函数中

constructor()
{
   super()
}

就在你需要的时候

constructor()
{
   super()
}
这是你上传DocumentTemplateComponent的全部代码吗?这是你上传DocumentTemplateComponent的全部代码吗?