Websocket creation using sockjs-client/sockjs in angular2 webapp project
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Angular2 webapp project for FRONT-END and Vertex3 for BACK-END. Using Sockjs-client i'm creating websocket (at client side) to create a communication channel between Frontend and Backend. I have installed sockjs-client using npm : npm install sockjs-client When I import sockjs-client in LoginService.ts file : import * as SockJS from 'sockjs-client'; export class LoginService { URL: string = 'http://localhost:8082/eventbus'; sock: SockJS; handlers = {}; private _opened: boolean = false; public open(): void { if (!this._opened) {