How to avoid $compile:tpload errors on 401 status code response
问题 We are developing a Single Page Application with AngularJS and ASP.NET MVC Json Rest API. When an unauthenticated client tries to navigate to a private route (Ex: /Foo/Home/Template ) to get a template, it gets a 401 response from the Web API and our AngularJS app automatically redirects it to the login page. We are handling the 401 with $http interceptor with something like this: if (response.status === 401) { $location.path(routeToLogin); return $q.reject(response); } Entering the correct