在ionic教程中,它在没有任何参数的情况下将参数定义为函数并调用。如何运作?
private extractData(res: Response) {
let body = res;
return body || {};
}
getClassroom(): Observable<any> {
return this.http.get(apiUrl, httpOptions).pipe(
map(this.extractData),
catchError(this.handleError));
}