0
I’m developing an Angular 2 application and in my service I’m returning one Observable<Pessoa[]>
but when returning http with my get it runs the following error. Type 'Observable<HttpResponse<Object>>' is not assignable to type 'Observable<Pessoa[]>'.
Type 'HttpResponse<Object>' is missing the following properties from type 'Pessoa[]': length, pop, push, concat, and 26 more.
Personal service
/**CONSULTA TODAS AS PESSOAS CADASTRADAS */
getPessoas(): Observable<Pessoa[]> {
return this.http.get(this.baseUrlService, { observe: 'response' });
}
pq vc need to observe Sponse??
– Eduardo Vargas