Open pedroreys opened 10 years ago
+1 :+1:
For most build systems, this is not an issue since they use ng-annotate to automatically add the necessary names before minification. My advice : use gulp-ng-annotate
Anyway, my opinion on this is thate source code should NOT be cluttered with minification-targeted annotations.
Angular, by default, infers the dependencies based on their names, but this behavior breaks when the directive is minified.
In order to be able to minify the directive, I had to annotate the functions with the names of the depedencies, the same way that the angular docs suggests to do in controller definitions. (See, note on minification)