Closed TeDyGuN closed 5 years ago
Hi @TeDyGuN ,
The adapter requires an Observable
return. If your method to retrieve your data is synchronous you could just wrap your result with an Observable.of(yourDataHere)
call.
Hope it helps! Cheers.
I solved with this code, thanks a lot!!
public getMessageHistoryByPage(userId: any, size: number, page: number): Observable<Message[]> {
let url = 'http://localhost:3000/historial/' + userId + '/' + this.user.id + '/' + size + '/' + page;
return this.http.get<Message[]>(url);
}
hello, I have a question more of programming than ngChat, I'm stuck 3 days with this, that's why I see the need to open this issue. how can I get the messages from the database without an observable?, since I cant get the messages outside de http.get because it is a synchronous function.
Thanks for answer and sorry for the noob question.