Workaround for UI-router bug for build with slash in the name. Fixes #105

This commit is contained in:
Colin McLeod
2015-10-09 18:29:04 -07:00
parent e837bb68fb
commit d476c58a9c

View File

@@ -12,7 +12,7 @@ angular.module('app').controller('OutfitController', ['$window', '$rootScope', '
ship.buildWith(data.defaults); // Populate with default components
}
$scope.buildName = $p.bn;
$scope.buildName = $p.bn ? $window.decodeURIComponent($p.bn) : null;
$scope.ships = Ships;
$rootScope.title = ship.name + ($scope.buildName ? ' - ' + $scope.buildName : '');
$scope.ship = ship;