मेरे कारखाने की तरह दिखता है में परिवर्तन नहीं करता है:
'use strict';
angular.module('myApp')
.factory('httpInterceptor',['$q','$location', '$rootScope', function($q, $location, $rootScope){
return {
response: function(response) {
if(response.success === false) {
console.log("Redirecting");
$location.path('/login');
return $q.reject(response);
}
return response || $q.when(response);
}
}
}]);
यह लॉग बाहर थूक, लेकिन पथ नहीं बदलता है। ऐसा करने के लिए मैं क्या कर सकता हूं?
संबंधित प्रश्न: http://stackoverflow.com/questions/25579938/location-path-not-working-from-http-interceptor/ – Sirozha