angular-websocket icon indicating copy to clipboard operation
angular-websocket copied to clipboard

Can't get data in a conroller

Open tov-kaschey opened this issue 8 years ago • 1 comments

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

tov-kaschey avatar Jun 23 '16 11:06 tov-kaschey

try this:

`var collection = { data: [] };

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

peteringram0 avatar Jul 18 '16 08:07 peteringram0