Fix error page url resolution.

Now it properly redirects to error page when
api service is down.
stable
Andrey Antukh 2014-09-04 11:43:01 +02:00
parent 4f71ed2e04
commit f237e97f45
2 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, tgLoade
return promise.then null, (response) -> return promise.then null, (response) ->
if response.status == 0 if response.status == 0
$location.path($navUrls.resolve("error")) $location.path($navUrls.resolve("error"))
$location.replace()
else if response.status == 401 else if response.status == 401
nextPath = $location.path() nextPath = $location.path()
$location.url($navUrls.resolve("login")).search("next=#{nextPath}") $location.url($navUrls.resolve("login")).search("next=#{nextPath}")

View File

@ -44,6 +44,7 @@ module.directive("tgMain", ["$rootScope", "$window", TaigaMainDirective])
urls = { urls = {
"home": "/" "home": "/"
"error": "/error"
"login": "/login" "login": "/login"
"forgot-password": "/forgot-password" "forgot-password": "/forgot-password"
"change-password": "/change-password/:token" "change-password": "/change-password/:token"