ruhley / angular-color-picker

Vanilla AngularJS Color Picker Directive with no requirement on jQuery
http://ruhley.github.io/angular-color-picker/
MIT License
165 stars 78 forks source link

v2.4.2 breaks $provide.decorator('ColorPickerOptions', function($delegate) { ... } #103

Closed rooterkyberian closed 8 years ago

rooterkyberian commented 8 years ago

I have been using following example snippet sucessfully with v2.4.1

    .config(function($provide) {
        $provide.decorator('ColorPickerOptions', function($delegate) {
            var options = angular.copy($delegate);
            options.round = true;
            options.alpha = false;
            options.format = 'hex';
            return options;
        });
    });

After update to v2.4.2 it breaks on Cannot set property 'required' of undefined

ruhley commented 8 years ago

Can you give me more details on your setup - OS, browser, angularjs version etc

I cannot replicate this problem, and I am doing exactly the same as you - https://github.com/ruhley/angular-color-picker/blob/master/examples/app.js#L3-L11

rooterkyberian commented 8 years ago

I have successfully reproduced this problem on freshly checked out angular-color-picker repository by adding

                <div class="row">
                    <h2>No HTML Options</h2>
                    <label class="control-label">Color</label>
                    <color-picker class='col-sm-1' ng-model="color" /></color-picker>
                </div>

to examples/01-simple.html

I will provide you more details if you can't reproduce it this way, but for here is basic information you asked about: Linux, Chromium 52.0.2743.85 (64-bit), angular#v1.5.8.

ruhley commented 8 years ago

Fixed in commit 7bcebb5bf0dcc9e38236458fc9d0aecbc5ea550e and released in v2.4.3