Show More
@@ -38,6 +38,7 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour' | |||||
38 | }; |
|
38 | }; | |
39 | stateHolder.websocket.onmessage = function (event) { |
|
39 | stateHolder.websocket.onmessage = function (event) { | |
40 | var data = JSON.parse(event.data); |
|
40 | var data = JSON.parse(event.data); | |
|
41 | $scope.$apply(function (scope) { | |||
41 | _.each(data, function (message) { |
|
42 | _.each(data, function (message) { | |
42 | console.log('channelstream-message', message); |
|
43 | console.log('channelstream-message', message); | |
43 | if(typeof message.message.topic !== 'undefined'){ |
|
44 | if(typeof message.message.topic !== 'undefined'){ | |
@@ -48,6 +49,7 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour' | |||||
48 | $rootScope.$broadcast('channelstream-message', message); |
|
49 | $rootScope.$broadcast('channelstream-message', message); | |
49 | } |
|
50 | } | |
50 | }); |
|
51 | }); | |
|
52 | }); | |||
51 | }; |
|
53 | }; | |
52 | stateHolder.websocket.onclose = function (event) { |
|
54 | stateHolder.websocket.onclose = function (event) { | |
53 | console.log('closed'); |
|
55 | console.log('closed'); |
General Comments 0
You need to be logged in to leave comments.
Login now