【问题标题】:Argument of type '(data: MyContact[]) => void' is not assignable to parameter of type '(value: MyContact) => void''(data: MyContact[]) => void' 类型的参数不可分配给 '(value: MyContact) => void' 类型的参数 【发布时间】:2022-07-20 22:56:10 【问题描述】: Argument of type '(data: MyContact[]) => void' is not assignable to parameter of type '(value: MyContact) => void'. Types of parameters 'data' and 'value' are incompatible. 【问题讨论】: 标签: angular 【解决方案1】: public getAllContacts(): Observable{ 让 dataUrl:string= ${this.baseUrl}/contact; 返回 this.http.get(dataUrl).pipe(catchError(this.handleError)) } 【讨论】: