You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
The idea is provide a value, if you don't, you can use a empty string:
color: string= ''
and the default color will be #f00.
If the color is undefined would be something like this:
ngOnInit() {
if (!this.colorPicker) this.colorPicker = '';
let hsva = this.service.stringToHsva(this.colorPicker);
if (hsva !== null) {
this.colorPickerChange.emit(this.service.outputFormat(hsva, this.cpOutputFormat));
}
}
Well...in some cases the directive could be inside of a form and the value not defined yet.
I'm adding in the next update undefined variables and a new option for the default value when is not defined (now is #f00 when is a empty string).
Hi,
I had to add
to the directive, to get it going. Is this correct?
The text was updated successfully, but these errors were encountered: