mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
In AngularSpa template, log any FetchData errors but don't stop prerendering completely
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user