tchatel / angular-treeRepeat

Recursive repeater for AngularJS
Do What The F*ck You Want To Public License
115 stars 16 forks source link

make directive able to be minified #6

Open pedroreys opened 10 years ago

pedroreys commented 10 years ago

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)

leiming commented 9 years ago

+1 :+1:

couzic commented 9 years ago

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.