I\'m getting a compilation error on the return type when using HttpClient. In my function GetPortfolio
, I\'m expecting the GET
call to return the j
As this is a service 'PortfolioService' we may not need interface here, instead we can use of type any, and also GET method is only necessary here.
GetPortfolio(portfolioId): Observable {
return this.http.get(this.apiUrl + '/${portfolioId}')
.map((response:any) => {
return response;
});
}
This should work, please try.