Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error in production build #189

Open
sarmstronghxm opened this issue Jun 26, 2019 · 1 comment
Open

Getting error in production build #189

sarmstronghxm opened this issue Jun 26, 2019 · 1 comment
Labels

Comments

@sarmstronghxm
Copy link

I'm using the following in my app:

<input type="text"
	[(colorPicker)]="bg_color" 
	[cpOutputFormat]="'hex'"
	[style.background]="bg_color"
	formControlName="bg_color"
	autocomplete="new-password"
	id="bg_color" 
	class="form-control color-picker-inp"
	value="">

It works just fine until I compile it to production. After doing that, I'm getting the following error anytime I click on a color (after the popover shows showing all the colors):

Cannot set property bg_color of [object Object] which has only a getter

Any help would be appreciated.

@sconix
Copy link
Contributor

sconix commented Jun 26, 2019

Your error is not anyway related to this library so not exactly the right place to ask help. Afaik you can not use style.background to set style, you should use ngStyle but not fully sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants