Following Code:
private getJSON(): Observable<any> {
return this.http.get('./reportNav-NEW.json')
.map((res:any)=> res.json())
.catch((error:any) => console.log(error));
}
The Error gives me:
Argument of type '(error: any) => void' is not assignable to parameter of type '(err: any, caught: Observable) => ObservableInput<{}>'. Type 'void' is not assignable to type 'ObservableInput<{}>'.
It happens in the .catch((error:any) => console.log(error));