Skip to content

Commit 8842253

Browse files
author
mancioshell
committed
Fix NgAnimate and Toastr circular dependency issue. I can't find solution to use toastr into TokenInterceptor Service at the moment.
1 parent a1b096c commit 8842253

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

public/scripts/src/services.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define(['angular', 'angularToastr'], function (angular, toastr) {
1+
define(['angular'], function (angular) {
22
'use strict';
33

44
var myAppServices = angular.module('myAppServices', []);
@@ -95,17 +95,14 @@ define(['angular', 'angularToastr'], function (angular, toastr) {
9595
return config;
9696
},
9797

98-
response: function (response) {
98+
response: function (response) {
9999
return response || $q.when(response);
100100
},
101101
responseError : function (response) {
102102

103-
console.log(response);
104-
105103
if(response.config.url!=="/api/login" && response.status===401){
106104
localStorageService.clearAll();
107-
$location.path("/login");
108-
toastr.error("You have to perform signin to earned access to privileged resources!");
105+
$location.path("/login");
109106
}
110107

111108
return $q.reject(response);

0 commit comments

Comments
 (0)