In my service, I have a series of http.get requests structured as follows:
constructor(private http:Http) {}
getDetails(sysID:string){
var details;
this.http.get('https://blahURL').map(res => res.json().filter(f => f.id == another.id)[0]).subscribe(
(data) => details = data, // Executed if res.status >= 200 && <= 299
(err) => console.log(err), // Executed if request fails
function(){ // On completion
console.log(this);
this.http.get(...) //<- fails
Although the "on Completion" function is triggered, the this
object logged in the console appears to be a SafeSubscriber instance, causing the subsequent http call using this.http
to fail.
What could be the issue here?