cgarvis / angular-toggle-switch

AngularJS Toggle Switch
http://cgarvis.github.io/angular-toggle-switch
MIT License
160 stars 124 forks source link

Please support minification #23

Closed mcasimir closed 10 years ago

mcasimir commented 10 years ago

Minification with your code breaks everytihing. Solution: use this:

    controller: ['$scope', function($scope){
      $scope.toggle = function toggle() {
        if(!$scope.disabled) {
          $scope.model = !$scope.model;
        }
      };
    }],

Instead of:

    controller: function($scope) {
      $scope.toggle = function toggle() {
        if(!$scope.disabled) {
          $scope.model = !$scope.model;
        }
      };
    },

Thank You!

cgarvis commented 10 years ago

This was requested in #21. The solution is to use ngmin or use the prebuilt minified version. If this is requested again, I may change my stance.

ms88privat commented 10 years ago

Hi, please add it in the future. In my case, i only minify my own included scripts with ngmin for performance reason. But i want to include the non-min-js version for debugging of third party scripts while developing.

cgarvis commented 10 years ago

I provide a minified version. You can use that when you don't need to debug.

adamdicarlo commented 9 years ago

I'd rather my own build do the minification (and have the option to generate a source map, which is not included in angular-toggle-switch). Mostly because then I don't have to switch out which version of the library I use for debug builds and release builds. (My build system doesn't have ngmin and it'd be a pain to add, unfortunately.)

I figured since ngmin is set up in your build you wouldn't want to add the annotation, though, so I just added it myself in my own fork but excluded that from the PR I submitted. ;)

cgarvis commented 9 years ago

Having a "debug" stable version would be helpful. I agree that that should have the annotation on it. I'll work on moving towards this.

FreeFrags commented 7 years ago

Any progress on this?