I am new at AngularJS and just learned that minification only works if you 
take precautions.

I read this 
article: 
http://thegreenpizza.github.io/2013/05/25/building-minification-safe-angular.js-applications/
It suggests a number of formats which all have "[" and "]" in specific 
locations to over come the effects of minification.

I am using this generator for my project 
- https://github.com/cgross/generator-cg-angular - it does the minification 
as part of the grunt build.

*When I try to fix POST to work with Apache, it does not pass minification *(as 
described 
here: 
http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/)

*My version of the code is this:*
http://jsbin.com/wojac/2/edit?js

*It works fine when I run the project, but when I build and minify it 
fails.*

*The error I get is:*
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due 
to: Error: [$injector:modulerr] Failed to instantiate module httpPostFix 
due to: Error: [$injector:unpr] Unknown provider: a 
http://errors.angularjs.org/1.2.15-build.2365+sha...<omitted>...0) 

It seems that the module itself is not minification proof.

Surely I am not the first person to try and alter Post using this technique 
and expecting the minified result to work.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to