From 9b20bff43bbc79137c03c92108862e0fdbc06632 Mon Sep 17 00:00:00 2001 From: gustavo Date: Sun, 22 May 2016 23:16:38 +0200 Subject: [PATCH] STOMP shared worker: missing vm reference in shared-stomp controller --- .../stomp/src/stomp/app/shared-stomp/shared-stomp.controller.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/angularjs/stomp/src/stomp/app/shared-stomp/shared-stomp.controller.js b/angularjs/stomp/src/stomp/app/shared-stomp/shared-stomp.controller.js index 13f7abd..8eb57f0 100644 --- a/angularjs/stomp/src/stomp/app/shared-stomp/shared-stomp.controller.js +++ b/angularjs/stomp/src/stomp/app/shared-stomp/shared-stomp.controller.js @@ -24,7 +24,6 @@ function SharedStompController($location, sharedWorker) { var vm = this; - vm.url = $location.protocol() + '://' + $location.host() + '/spring-stomp-server-full/fullportfolio'; vm.clientDestination = '/topic/greeting'; vm.serverDestination = '/app/greeting'; @@ -46,11 +45,11 @@ vm.connect = function () { - sharedWorker.connect(JSON.parse(connectHeaders), connectSuccessCallback, connectErrorCallback); + sharedWorker.connect(vm.url, JSON.parse(vm.connectHeaders), connectSuccessCallback, connectErrorCallback); }; vm.subscribe = function () { - sharedWorker.subscribe(clientDestination, subscribeCallback, JSON.parse(subscribeHeaders)); + sharedWorker.subscribe(vm.clientDestination, subscribeCallback, JSON.parse(subscribeHeaders)); }; vm.unSubscribe = function () { -- 2.1.4