I have my below code that uses socket.io to get tweets from my back-end. I'm using ntwitter and am opening up a stream. I'm trying to get the tweets into a queue so that I can have them float across the screen at different time intervals, but the socket never stops getting tweets so my queue isn't accessible form my front-end in angular. I do successfully pull the tweets, because I console.log them, I just can't have them show up on the front-end.
socket.on('tweet', function(data){
$scope.tweetObject = {
"user": data.user,
"text": data.text
}
$scope.queue.enqueue(tweetObject);
$scope.tweet = $scope.queue.dequeue();
console.log($scope.tweet);
});
my html front-end
<div ng-controller="mainSpaceController">
<div class="tweet" ng-repeat="x in tweetObject">
<p> in the field</p>
{{x.user}}
{{x.text}}
</div>
</div>