Update the Angular Page when new message received in a queue

79 views
Skip to first unread message

Dipu D

unread,
Jul 1, 2023, 3:29:59 PM7/1/23
to Angular and AngularJS discussion
Guys,

I have a requirement to refresh an angular component, when someone send message to a queue. I have a service which will take the message from the queue and process. However, I would love to know, how can we update the data on the angualr component, after the service complete its execution, as the service knows nothing about angular or, is there any way for the service to trigger a change in the angular component.

Other than the timer available in the angular to periodically poll the service manually, do we have any other option available to meet this requirement?

Any help on this is much appreciated.

Thanks
Dipu

ADEWALE ADISA

unread,
Jul 3, 2023, 9:31:55 AM7/3/23
to ang...@googlegroups.com
Generally, you can use websocket to communicate with angular from your service.

--
You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular/fc5817b0-bd0a-4e3f-9794-f523adecd29cn%40googlegroups.com.

John Gregory

unread,
Jul 3, 2023, 1:27:29 PM7/3/23
to ang...@googlegroups.com
You can also use an RXJS subscription.  It's been awhile, but I've used them in the past

--
Reply all
Reply to author
Forward
0 new messages