I'm trying to make a call from an Angular app but I am getting the following error:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.
Here is my code:
constructor(private http: Http) {
}
getNearbyRestaurants(lat: number, lng: number){
return this.http.get(this.API_URL+this.API_KEY+`&location=${lat},${lng}`).pipe(
map(result => result)
);
}
}
Does anybody know how to resolve this? Thanks