AngularJS using an interceptor to handle $http 404s - promise not defined error

前端 未结 3 943
庸人自扰
庸人自扰 2021-02-01 20:01

I have an Angular app, for which I want to handle 404s form an API end point. The key components are like so:

// app.js

var myApp = angular.module(\'myApp\', [\         


        
3条回答
  •  名媛妹妹
    2021-02-01 20:39

    I think the structure of you interceptor might be off. I posted an answer with a sample interceptor here (Handle HTTP 302 response from proxy in angularjs) that you might find useful. It works for me on a daily basis.

提交回复
热议问题