diff --git a/public/app/controllers/mainCtrl.js b/public/app/controllers/mainCtrl.js index 4f2dec3..26abe2d 100644 --- a/public/app/controllers/mainCtrl.js +++ b/public/app/controllers/mainCtrl.js @@ -235,7 +235,8 @@ angular.module('mainCtrl', []) } vm.rankingDialog = function($event){ - sortedRobots = vm.rankingRobots; + refreshRobotList(vm.categoryId); + vm.ranking = getRanking(vm.robots, vm.categoryRankingSize); var dialog = ngDialog.open({ template: 'app/views/modals/ranking.html', scope: $scope, @@ -243,7 +244,7 @@ angular.module('mainCtrl', []) controllerAs: 'main', width: 560, data: { - robots: sortedRobots + robots: vm.ranking } }); }