This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import * as Stomp from 'stompjs'; | |
import * as SockJS from 'sockjs-client'; | |
@Injectable({ providedIn: 'root' }) | |
export class WebSocketService { | |
//connect to websocket server | |
public connect() { | |
let socket = new SockJS("http://192.168.1.9:8080/websocketapp"); | |
let stompClient = Stomp.over(socket); |