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 795f4d8 commit 0f0f436
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions public/js/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ angular.module('mean.system').controller('IndexController', [
$location.path('/app');
};

window.onload = () => {
connectPeople();
$scope.userGames()
};
// window.onload = () => {
// connectPeople();
// $scope.userGames()
// };

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

$scope.removeUserOnline = () => {
socket.emit('removeUser', $scope.global.user.username);
Expand Down

0 comments on commit 0f0f436

Please sign in to comment.