Angular 7 WebSocket主题。订阅路径

时间:2019-04-24 13:29:37

标签: angular websocket rxjs

我正在Angular7中使用WebSocketSubject。

  this.socket$ = new WebSocketSubject({
    url: 'ws://localhost:8080/bc'
  });

是否可以在此WS内预订其他路径? 例如/ topic / message

就像:

var socket = new SockJS('/bc');
stompClient = Stomp.over(socket);
stompClient.subscribe('/topic/message'

....

0 个答案:

没有答案