2

Trying to uglify angularjs app with mangle causes the error. However I've read that that should be fixed by ngmin. I use ngmin to properly wrap my controller code in an array as required by angular. I can confirm that ngmin works and all my code is wrapped. Only mangling causes the error, mangle:false works just fine. Can anyone confirm whether mangling is supposed to work or if there are edge cases other than the array issue that causes mangling to fail.

Thanks.

Harry
  • 52,711
  • 71
  • 177
  • 261
  • I think the general consensus is not to use mangle, but the current top answer to this question seems to indicate it should work as long as you ng-min first: http://stackoverflow.com/questions/17238759/angular-module-minification-bug – Marc Kline May 08 '14 at 18:23

1 Answers1

3

I could not get it to work with ng-min. However I did get it to work with ng-annotate. https://github.com/olov/ng-annotate

It's a fantastic replacement for ng-min.

Harry
  • 52,711
  • 71
  • 177
  • 261