Closed synthsym closed 10 years ago
Thanks for your pull request. However, I do not agree that this is a good idea. There exist good modules which can make your Angular code 'minify proof'. I consider it bad practice to not use such tools.
This module already provides a minified version. Whenever you use libraries which already provide a minified version you should not try to re-minify it yourself.
I'm not aware of any modules that make code "minification-proof" apart from ngmin, which converts it to the same array style injection. This is already specified as good practise in the AngularJS docs, so why aren't we following that good practise?
Besides, you yourself made such changes to the angular-kendo
project to fix the same issue that is experienced here.
You are right that I did fix such issue, quite a while ago, on angular-kendo
. I also agree that using the array style injection is good practice.
I just think that using gulp
or grunt
with ngmin
to automatically provide this, is even better practice. It:
This would only cause problems when people are doing two things, which both are quite wrong:
ngmin
).I just think that using gulp or grunt with ngmin to automatically provide this, is even better practice.
I had worked on the project that was using array style injections and uglifying the output. For development purposes, you always included full version of the code & minified everything on build step (we didn't use ngmin or anything similar).
This has several advantages:
If the js is minified by another system, the parameter specifying
$stateprovider
would be converted to single character, thus breaking the injector.