ERROR TypeError: Cannot read properties of undefined (reading 'nativeElement')
Stan92 opened this issue · 1 comments
Stan92 commented
Hi,
I've some troubles using the library (working with Angular 12)
I get
core.js:6456 ERROR TypeError: Cannot read properties of undefined (reading 'nativeElement')
at ColorPickerComponent.push.96718.ColorPickerComponent.ngOnInit (ngx-color-picker.es5.js:1075:1)
at callHook (core.js:2526:1)
at callHooks (core.js:2495:1)
at executeInitAndCheckHooks (core.js:2446:1)
at refreshView (core.js:9460:1)
at refreshEmbeddedViews (core.js:10570:1)
at refreshView (core.js:9469:1)
at refreshComponent (core.js:10616:1)
at refreshChildComponents (core.js:9242:1)
at refreshView (core.js:9495:1)
This is my code.
<div class="form-group row">
<label class="col-lg-4 col-md-12 col-form-label text-lg-right">Color</label>
<div class="col-lg-8 col-md-12">
<input [(colorPicker)]="color" [style.background]="color" />
</div>
</div>
Any help?
Stan92 commented
My bad.. didn't use the latest version.