btford/angular-socket-io-seed

$scope.messages needs declaration

kentcdodds opened this issue · 1 comments

I was getting a problem sending messages and it's because $scope.messages was never defined, so when we tried to push a message to it we were getting an error. Doing this solved the problem:

controllers.js:

function AppCtrl($scope, socket) {

  $scope.messages = [];

  // Socket listeners
  // ================

  socket.on('init', function (data) {

...

I figured it was such a small change that it would be easier to submit an issue than a pull request.

Wrong repo. This should go here: https://github.com/btford/angular-socket-io-im