PatrickJS / angular-websocket

:arrow_upper_left: The missing Angular WebSocket module for connecting client applications to servers by @AngularClass
https://angularclass.github.io/angular-websocket
MIT License
1.22k stars 195 forks source link

Can't get data in a conroller #85

Open tov-kaschey opened 8 years ago

tov-kaschey commented 8 years ago

I tried an example from readme https://github.com/AngularClass/angular-websocket?utm_source=angular-js.in&utm_medium=website&utm_campaign=content-curation . And I can't get data in a controller. In a factory I can see them using console.log. But there is no data in $scope.MyData.collection

peteringram0 commented 8 years ago

try this:

`var collection = { data: [] };

collection.data = JSON.parse(message.data);`