To show internal server error message (500) in the model, I am trying to inject bootstrap $ modal in httpProvider, but I am getting circular dependencies I
app.config (function ($ httpProvider) {$ httpProvider.interceptors.push (function ($ q, $ location, $ modal) {return { 'response': function (response) {return response;}, 'responseError': function (rejection, modalInstance) {if (reject .status === 401) {Console.log ('No Permission - Login Page Redirecting '); $ Locationkpath ( "/ login");} else if (Aswikritikstats === 404) {var modalInstance = $ modal.open ({templateUrl:' templates / models / error error.pl. html ', controller' Modlkantrolr 'size' or MD 'solution: {object: function () {return object;}}});} return $ q.reject (rejection);}};}); < / Code>
How to solve any ideas?
$ injector use:
app.config (function ($ httpProvider) {$ httpProvider.interceptors.push (function ($ q, $ location, $ injector) {var modal = $ i Njector.get ("$ modal"); Modal.open ...
No comments:
Post a Comment