In AngularSpa template, log any FetchData errors but don't stop prerendering completely
This commit is contained in:
parent
721e3c45fd
commit
4ba0358987
|
|
@ -11,7 +11,7 @@ export class FetchDataComponent {
|
||||||
constructor(http: Http, @Inject('ORIGIN_URL') originUrl: string) {
|
constructor(http: Http, @Inject('ORIGIN_URL') originUrl: string) {
|
||||||
http.get(originUrl + '/api/SampleData/WeatherForecasts').subscribe(result => {
|
http.get(originUrl + '/api/SampleData/WeatherForecasts').subscribe(result => {
|
||||||
this.forecasts = result.json() as WeatherForecast[];
|
this.forecasts = result.json() as WeatherForecast[];
|
||||||
});
|
}, error => console.error(error));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue