Skip to content

Conversation

@pedroreys
Copy link

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
Copy link

leiming commented Nov 26, 2014

+1 👍

@couzic
Copy link

couzic commented Nov 28, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants