Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.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 提供的参数与组件构造函数中调用目标的任何签名都不匹配_Angular_Dependency Injection - Fatal编程技术网

Angular 提供的参数与组件构造函数中调用目标的任何签名都不匹配

Angular 提供的参数与组件构造函数中调用目标的任何签名都不匹配,angular,dependency-injection,Angular,Dependency Injection,我看到这个问题被问了很多次,但是我找不到一个与构造函数/超级函数中的错误相关的答案 ClassB扩展了ClassA。ClassA除了几个受保护的变量之外是空的。ClassB有一个如下所示的构造函数: constructor( protected route: ActivatedRoute, protected recipesService: RecipesService) { super(route) } 错误 提供的参数与调用目标的任何

我看到这个问题被问了很多次,但是我找不到一个与构造函数/超级函数中的错误相关的答案

ClassB扩展了ClassA。ClassA除了几个受保护的变量之外是空的。ClassB有一个如下所示的构造函数:

constructor(
        protected route: ActivatedRoute,
        protected recipesService: RecipesService) {
        super(route)
    }
错误

提供的参数与调用目标的任何签名都不匹配

是在super上,我知道它的参数数目错误

但呼叫目标在哪里?什么决定了它应该有多少个参数