ngrx data and websocket

82 views
Skip to first unread message

Mohamed Jamel

unread,
Aug 11, 2020, 9:38:23 AM8/11/20
to Angular and AngularJS discussion
Hi,
I'm a new at ngrx term . I'm trying to get websocket data from my back-end and store it as an entity using ngrx data i tried to change the getAll() method to get data as websocket but it seems not working cause the method based as httpclient .
can anyone help me with this ?
Best regards  

Sander Elias

unread,
Aug 12, 2020, 12:33:11 AM8/12/20
to Angular and AngularJS discussion
Angular's httpClient does a complete when the data is in. I suspect your setup is waiting for the complete before it actually reacts. You need to change this around so it acts when the data appears. The being difference here is that its actually possible that there will be new data coming in over your websocket, while http.get is a single operation.

Regards
Sander

Op dinsdag 11 augustus 2020 om 15:38:23 UTC+2 schreef khiared...@gmail.com:

Mohamed Jamel

unread,
Aug 12, 2020, 5:54:38 AM8/12/20
to Angular and AngularJS discussion
Hi Sander,

yes, I think that is the problem cause i already tried websocket without ngrx data and it's working .
i only subscribed to  the websocket  under rxjs module without given a http method.
i want to implement this function with ngrx data 

Best regards
Reply all
Reply to author
Forward
0 new messages