Hello, I'm trying to use ng-chat in a personal project, and at the moment I'm implementing the listFriends () method;
The problem I am facing is that the chat loads very fast, and the request has a lot of data, about 260 people, and when loading very fast, the method listFriends is finalized before the subscribe ends, leaving the chat without data. Is there any way to make the list friends method wait for the observable, or execute a method before the listFriends is executed?
See example
I tried creating methods run after, or passing the result through localStorage, but nothing worked. Any tip is great.
Hello, I'm trying to use ng-chat in a personal project, and at the moment I'm implementing the listFriends () method;
The problem I am facing is that the chat loads very fast, and the request has a lot of data, about 260 people, and when loading very fast, the method listFriends is finalized before the subscribe ends, leaving the chat without data. Is there any way to make the list friends method wait for the observable, or execute a method before the listFriends is executed?
See example![image](https://user-images.githubusercontent.com/46055626/55831958-cfffb680-5aea-11e9-918b-5c731806c49d.png)
I tried creating methods run after, or passing the result through localStorage, but nothing worked. Any tip is great.