ngx-color icon indicating copy to clipboard operation
ngx-color copied to clipboard

Out of NgZone and can't bind color data on latest angular version

Open mayankkataria opened this issue 3 years ago • 0 comments

I was trying to change the value of backgroundColor by panning on this color picker. Though the value of backgroundColor was changing in console but the effect was not seen on HTML view. So I have to seperately call this.zone.run() to bind event color with backgroundColor

  constructor( private zone: NgZone ) { }
  changeColor(ev) {
    this.zone.run(() => {
        this.backgroundColor = ev.color.hex;
    });
  }

mayankkataria avatar Nov 26 '20 16:11 mayankkataria