I\'m learning Angular2 and Typescript. I\'m working through the Heroes tutorial on angular.io, but applying it to a project I\'m converting from ASP.Net. I\'ve run into a pr
I had same problem, however no matter how I changed as above mentioned,It still not working. Until my college found this map, catch defination as VSC prompted
so the proper change should be like (add type cast the following place)
getRisks(): Observable {
return this.http.get(this.serviceUrl)
.map(this.extractData)
.catch(this.handleError);
}
I am new to TypeScript. so this kind of [method signature] really give me a hammer on the head :(
But finally it worked out :)