ngx-color
ngx-color copied to clipboard
Out of NgZone and can't bind color data on latest angular version
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;
});
}