Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After automatic redirect to login page, when user successfuly logs in…
…, user is redirected to original page.
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"use strict"; | ||
|
||
angular.module('smlBootstrap', ['smlBootstrap.services', 'smlBootstrap.filters', 'smlBootstrap.controllers', 'smlBootstrap.directives', 'ngSanitize', 'ajaxthrobber']) | ||
angular.module('smlBootstrap', ['smlBootstrap.services', 'smlBootstrap.filters', 'smlBootstrap.controllers', 'smlBootstrap.directives', 'ngSanitize', 'ajaxthrobber', 'ngCookies']) | ||
|
||
.config(function ($routeProvider) { | ||
|
||
|
@@ -70,7 +70,7 @@ angular.module('smlBootstrap', ['smlBootstrap.services', 'smlBootstrap.filters', | |
.run(function ($rootScope, UserSessionService, $location) { | ||
$rootScope.$on("$routeChangeStart", function (event, next, current) { | ||
if (!UserSessionService.isLogged() && (typeof next.templateUrl !== "undefined") && next.templateUrl.indexOf("/secured/") > -1) { | ||
$location.path("/login"); | ||
$location.search("page", $location.url()).path("/login"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
pbuda
Author
Contributor
|
||
} else if (UserSessionService.isLogged() && next.templateUrl === "partials/login.html") { | ||
$location.path("/"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So "search" stores the url in a cookie or sth like that? Or in memory?