Have all error pages be rendered by Angular
Fixes #2198 Fixes https://www.pivotaltracker.com/story/show/135724483
This commit is contained in:
parent
0aa6e6cd58
commit
c06bba38de
13 changed files with 78 additions and 116 deletions
|
@ -214,7 +214,8 @@ quayApp.config(['$routeProvider', '$locationProvider', 'pages', function($routeP
|
|||
|
||||
// 404/403
|
||||
.route('/:catchall', 'error-view')
|
||||
.route('/:catch/:all', 'error-view');
|
||||
.route('/:catch/:all', 'error-view')
|
||||
.route('/:catch/:all/:things', 'error-view');
|
||||
}]);
|
||||
|
||||
// Configure compile provider to add additional URL prefixes to the sanitization list. We use
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
*/
|
||||
angular.module('quayPages').config(['pages', function(pages) {
|
||||
pages.create('error-view', 'error-view.html', ErrorViewCtrl, {
|
||||
'title': '{{code}}',
|
||||
'title': '{{info.error_message || "Error"}}',
|
||||
'description': 'Error',
|
||||
'newLayout': false
|
||||
});
|
||||
}]);
|
||||
|
||||
function ErrorViewCtrl($scope, ApiService, $routeParams, UserService) {
|
||||
function ErrorViewCtrl($scope, ApiService, $routeParams, $rootScope, UserService) {
|
||||
$scope.info = window.__error_info;
|
||||
$scope.code = window.__error_code || 404;
|
||||
}
|
||||
|
|
Reference in a new issue