Skip to content

Commit

Permalink
Friendlier DI for minification compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
NotBobTheBuilder committed Nov 29, 2014
1 parent 86fadac commit 437a8e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/angular.cloudinary.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
['Src', 'Srcset', 'Href'].forEach(function(attrName) {
var normalized = 'cl' + attrName;
attrName = attrName.toLowerCase();
angularModule.directive(normalized, function($sniffer) {
angularModule.directive(normalized, ['$sniffer', function($sniffer) {
return {
priority: 99, // it needs to run after the attributes are interpolated
link: function(scope, element, attr) {
Expand Down Expand Up @@ -54,10 +54,10 @@
});
}
};
});
}]);
});

angularModule.directive('clTransformation', function() {
angularModule.directive('clTransformation', [function() {
return {
restrict : 'E',
transclude : false,
Expand All @@ -72,9 +72,9 @@
clImageCtrl.addTransformation(attributes);
}
}
});
}]);

angularModule.directive('clImage', function() {
angularModule.directive('clImage', [function() {
var Controller = function($scope) {
this.addTransformation = function(ts) {
$scope.transformations = $scope.transformations || [];
Expand Down Expand Up @@ -133,5 +133,5 @@

}
};
});
}]);
}));

0 comments on commit 437a8e5

Please sign in to comment.