Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Orlayhemmy authored May 24, 2018
1 parent 0361bff commit 592e77a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/js/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ angular.module('mean.system').controller('IndexController', [
// };

connectPeople = () => {
if (window.user) {
console.log('This function sets the user online');
socket.emit('connectedUser', $scope.global.user.username);
socket.emit('connectedUser', window.user.username);
}
};

$window.onload = connectPeople();
Expand Down

0 comments on commit 592e77a

Please sign in to comment.