From 4ba03589879dd40c082f0e7ed9ad104f789d779c Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 6 Jul 2017 14:57:07 +0100 Subject: [PATCH] In AngularSpa template, log any FetchData errors but don't stop prerendering completely --- .../ClientApp/app/components/fetchdata/fetchdata.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/AngularSpa/ClientApp/app/components/fetchdata/fetchdata.component.ts b/templates/AngularSpa/ClientApp/app/components/fetchdata/fetchdata.component.ts index 9c98b76..6296925 100644 --- a/templates/AngularSpa/ClientApp/app/components/fetchdata/fetchdata.component.ts +++ b/templates/AngularSpa/ClientApp/app/components/fetchdata/fetchdata.component.ts @@ -11,7 +11,7 @@ export class FetchDataComponent { constructor(http: Http, @Inject('ORIGIN_URL') originUrl: string) { http.get(originUrl + '/api/SampleData/WeatherForecasts').subscribe(result => { this.forecasts = result.json() as WeatherForecast[]; - }); + }, error => console.error(error)); } }