how to use webSocket in angular 6

BOUABDELLAH Imane picture BOUABDELLAH Imane · May 23, 2018 · Viewed 9.1k times · Source

i need to use webSocket to make a communication between spring and angular 6 (notification), i tried to import stompjs, sockJs-client or even angular2-websocket but nothing works, could you help me ? thank you.

Answer

Bhabani pattanayak picture Bhabani pattanayak · Jun 7, 2018

I tried with the documentation provided by Spring using sockJS and stomp. But with angular 6 not able to import the Stomp and SockJS. Finally found a way to make the socket working with angular 6 stomp and spring. This works with well for me with angular 6. Please go through this. http://newjavafaqs.blogspot.com/2018/06/web-socket-using-spring-and-stomp.html