Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make directive able to be minified #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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