Websocket - InvalidStateError: The connection has not been established yet

前端 未结 1 1472
刺人心
刺人心 2021-01-20 21:18

I\'m not able to connect Angular2 front-end with Spring\'s websocket back-end.

Spring configuration xml file:



        
1条回答
  •  佛祖请我去吃肉
    2021-01-20 22:00

    I found a solution to this problem some time ago, I'll post it here also.

    The issue is that: npm install sockjs-client downloads sockjs-node instead of client. I hope they will fix it soon.

    If you're facing the same issue you should download this file http://cdn.jsdelivr.net/sockjs/1/sockjs.min.js put it in your project and point to it in system-config.ts.

    0 讨论(0)
提交回复
热议问题