Skip to content

Instantly share code, notes, and snippets.

@thiagopnts
Created March 12, 2012 05:25
Show Gist options
  • Save thiagopnts/2020002 to your computer and use it in GitHub Desktop.
Save thiagopnts/2020002 to your computer and use it in GitHub Desktop.
function Controller() {
var self = this;
this.infos = [];
var socket = io.connect();
socket.on('news', function(data){
self.infos.push(data);
});
}
//in the view I have a ng:repeat="data in infos" but nothing happens
//when more data is pushed to infos array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment