0

I have implemented a single page application with angular js. Here is part of my application config:

var app = angular.module("myApp", ['angular-loading-bar', 'ngRoute'])
    .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
            cfpLoadingBarProvider.latencyThreshold = 1;
        }]);
app.config(['$routeProvider', '$locationProvider',
function($routeProvider, $locationProvider, $compile) {
    $routeProvider.
            when('/employee/master', {
                templateUrl:  '/shop/employee/master',
                controller: 'EmployeeController'
            }).
             .
             .
             .
}]);

And the controller:

app.controller('EmployeeController', function($scope, $templateCache)
{
   //some stuff

});

The /shop/employee/master url is a url of my server controller(not angular controller) and returns me an html content. But sometimes that server action may redirect to some other actions for some reasons(for example user's session time out). I need to detect http status 302(redirection) when angular get the template, But I don't know how can I capture angular GET request for template.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.