Alberplz / angular2-color-picker

Angular 2 Color Picker Directive, no dependences required.
MIT License
185 stars 82 forks source link

Error when creating inline color picker #52

Closed cmckni3 closed 7 years ago

cmckni3 commented 7 years ago
    <span [(colorPicker)]="highlightColors[highlightColor]"
          [cpOutputFormat]="'hex'"
          [cpDialogDisplay]="'inline'"
          [style.background]="highlightColors[highlightColor]"
          [cpToggle]="true">
    </span>

Error:

EXCEPTION: Error in ./DialogComponent class DialogComponent - inline template:30:182 caused by: Cannot read property 'a' of undefined
cmckni3 commented 7 years ago

I figured it out. My initial color was undefined because it's bound to the ngForm.