Can't get data in a conroller
tov-kaschey opened this issue · 1 comments
tov-kaschey commented
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
try this:
`var collection = {
data: []
};
collection.data = JSON.parse(message.data);`