diff --git a/app/client/views/team/teamCtrl.js b/app/client/views/team/teamCtrl.js index faf188193..1ba4a9989 100644 --- a/app/client/views/team/teamCtrl.js +++ b/app/client/views/team/teamCtrl.js @@ -16,7 +16,7 @@ angular.module('reg') $scope.TEAM = TEAM; - if ($scope.user.teamCode){ + function _populateTeammates() { UserService .getMyTeammates() .success(function(users){ @@ -25,6 +25,10 @@ angular.module('reg') }); } + if ($scope.user.teamCode){ + _populateTeammates(); + } + $scope.joinTeam = function(){ UserService .joinOrCreateTeam($scope.code)