diff --git a/app/js/directives/directive-header.js b/app/js/directives/directive-header.js index e4cd4a6d..1d61b560 100755 --- a/app/js/directives/directive-header.js +++ b/app/js/directives/directive-header.js @@ -8,6 +8,7 @@ angular.module('app').directive('shipyardHeader', ['lodash', '$rootScope', 'Pers scope.openedMenu = null; scope.ships = ships; scope.allBuilds = Persist.builds; + scope.buildsList = Object.keys(scope.allBuilds).sort(); scope.allComparisons = Persist.comparisons; scope.bs = Persist.state; @@ -65,6 +66,10 @@ angular.module('app').directive('shipyardHeader', ['lodash', '$rootScope', 'Pers $rootScope.hideAbout = function (){ $rootScope.showAbout = false; }; + + scope.$watchCollection('allBuilds', function() { + scope.buildsList = Object.keys(scope.allBuilds).sort(); + }); } }; }]); \ No newline at end of file diff --git a/app/views/_header.html b/app/views/_header.html index 9cb26ba0..c5a2f809 100755 --- a/app/views/_header.html +++ b/app/views/_header.html @@ -15,9 +15,9 @@ Builds