ionic-rating
ionic-rating copied to clipboard
lib is not minifcation safe
I have a useref task, which is outputting one single lib.js file (including ionic-rating). Afterwards I am gulp-uglify'ing that lib.js file. Unfortunately my dist app doesn't work anymore because ionic-rating is not minification safe.
As is:
.controller('RatingController', function($scope, $attrs, ratingConfig) {...
and
.directive('rating', function($timeout) {...
To be:
.controller('RatingController', ['$scope', '$attrs', 'ratingConfig', function($scope, $attrs, ratingConfig) {...
and
.directive('rating', ['$timeout', function($timeout) {...
Another solution could be ngInject, instead of using the DI-array.
Yup, got this error too. I had to add the library to my js files and used ng-annotate