I'm using Http.get to retrieve a configuration file. I've done this many times with success, but this time nothing. I'm not seeing the trace in my console, and I'm not seeing an error either, even though I am using .catch. What might be my problem here?
this._http.get('./assets/dashboard/json/config.json')
.map((response: Response) => {
console.log(response.json());
})
.catch((error: any) => Observable.throw(error || 'Server error'));
You need to have
subscribe()
in order to recieve the datayou need to call subscribe() in order that the request is executed.