Angular HttpClient return expecting observable<HttpEvent<any> rather than observable<any>
问题 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 json object of type Observable<Portfolio> but it's giving the error: Type Observable<HttpEvent<Portfolio>> is not assignable to type Observable<Portfolio> . Type HttpEvent<Portfolio> is not assignable to type Portfolio . Type HttpProgressEvent is not assignable to type Portfolio . Property name is missing in type HttpProgressEvent . My code: import {