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

adding angular array syntax for minification support #1

Merged
merged 1 commit into from
Jun 26, 2014

Conversation

alexreardon
Copy link
Contributor

Allows for error free minification

@mrowles
Copy link

mrowles commented Apr 23, 2014

+1 Good find

@@ -1,14 +1,14 @@
'use strict';

angular.module('ng.picturefill', [])
.directive('pictureFill', function () {
.directive('pictureFill', [function () {
return {
controller: 'PictureFillCtrl',
link: function (scope, elem, attrs) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array syntax not needed for link functions. It's arguments are based on order not name

@maxbates
Copy link

if you're using grunt to build you can just use the ng-min task and it will handle this for you. https://github.com/btford/grunt-ngmin

@alexreardon
Copy link
Contributor Author

Yes you can rely on that library. I thought there no harm in including it directly into the library to save the additional effort. Happy for you to reject the PR. Perhaps it is worth mentioning in the readme.md that for minification ngmin (or grunt-ngmin if using grunt) is required?

@maxbates
Copy link

maxbates commented May 1, 2014

(i don't own this repository - just a polyfill for those in need)

@Witchfinder
Copy link

I had considered submitting this myself, thanks for doing so. While ngMin will do it for you, I like to be formed like this.

tinacious added a commit that referenced this pull request Jun 26, 2014
adding angular array syntax for minification support
@tinacious tinacious merged commit 4c35405 into tinacious:master Jun 26, 2014
@tinacious
Copy link
Owner

Thanks!

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.

None yet

5 participants