diff --git a/front/src/js/controllers/dashboardCtrl.js b/front/src/js/controllers/dashboardCtrl.js index db1c4dd..12c269c 100644 --- a/front/src/js/controllers/dashboardCtrl.js +++ b/front/src/js/controllers/dashboardCtrl.js @@ -20,6 +20,9 @@ dashboardCtrl.controller('DashboardCtrl', ['$scope', '$rootScope', '$routeParams } function init() { + // By default, Angular sorts object's attributes alphabetically. Countering this problem by retrieving the keys order here. + $scope.categoriesOrder = Object.keys($scope.result.scoreProfiles.generic.categories); + $scope.globalScore = Math.max($scope.result.scoreProfiles.generic.globalScore, 0); $scope.tweetText = 'My website\'s score is ' + $scope.globalScore + '/100 on #YellowLabTools!'; } diff --git a/front/src/views/dashboard.html b/front/src/views/dashboard.html index 5f504d0..896ee77 100644 --- a/front/src/views/dashboard.html +++ b/front/src/views/dashboard.html @@ -11,7 +11,7 @@

Score details

-
+
{{category.label}}