LeaderboardController.js 360 Bytes
angular.module('footyroom')

.controller('LeaderboardController', ['$scope', 'leaderboard', '$location', function ($scope, leaderboard, $location) {
    $scope.sort = 'rank';
    $scope.leaderboard = leaderboard;

    $scope.changeLeaderboardPhase = function (phase) {
        $location.path('/predictor/leaderboard' + (phase ? `/${phase}` : ''));
    };
}]);