Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for http interceptors #59

Closed
homanchou opened this issue Nov 5, 2013 · 8 comments
Closed

Support for http interceptors #59

homanchou opened this issue Nov 5, 2013 · 8 comments

Comments

@homanchou
Copy link


App = angular.module("myApp", ["ngGrid", "ngAnimate",  "ui.router", "ui.bootstrap"]);

//The following broke during grunt build

App.config(function($httpProvider) {

    $httpProvider.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";

    $httpProvider.interceptors.push(function($q) {
     ....
    });

    $httpProvider.interceptors.push(function($q, $rootScope) {
      ....
    });

  }
]);

// we resorted to this format to get it to minify correctly

App.config([
  "$httpProvider", function($httpProvider) {

    $httpProvider.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";

    $httpProvider.interceptors.push(['$q', function($q) {
     ....
    }]);

    $httpProvider.interceptors.push(['$q','$rootScope', function($q, $rootScope) {
      ....
    }]);

  }
]);

@efolio
Copy link

efolio commented Jan 30, 2014

+1, I just lost hours figuring this out…

@fitzchak
Copy link

+1, I also lost two hours for figuring this out...

@jtammen
Copy link

jtammen commented Apr 14, 2014

+1

@olalonde
Copy link

olalonde commented May 4, 2014

Oh.. thanks for this issue. I couldn't figure out what was breaking my build.

@selvakn
Copy link

selvakn commented May 12, 2014

👍

few more hours lost here..

@akalirong
Copy link

spending hours on this!!! please fix!!

@34r7h
Copy link

34r7h commented Jun 23, 2014

so does anyone know of any hip, angular grunt tasks that account for these trivial issues before someone like me has to be all proper with dept injections?

@eddiemonge
Copy link
Collaborator

Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93

If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues

If you really want ngmin to fix this issue, feel free to fork it and use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants