diff --git a/projects/lib/src/lib/color-picker.module.ts b/projects/lib/src/lib/color-picker.module.ts index e6a645a..4fcb208 100644 --- a/projects/lib/src/lib/color-picker.module.ts +++ b/projects/lib/src/lib/color-picker.module.ts @@ -12,7 +12,6 @@ import './ng-dev-mode'; @NgModule({ imports: [ CommonModule ], exports: [ ColorPickerDirective ], - providers: [ ColorPickerService ], declarations: [ ColorPickerComponent, ColorPickerDirective, TextDirective, SliderDirective ] }) export class ColorPickerModule {} diff --git a/projects/lib/src/lib/color-picker.service.ts b/projects/lib/src/lib/color-picker.service.ts index 672e4a2..33a0194 100644 --- a/projects/lib/src/lib/color-picker.service.ts +++ b/projects/lib/src/lib/color-picker.service.ts @@ -4,7 +4,9 @@ import { Cmyk, Rgba, Hsla, Hsva } from './formats'; import { ColorPickerComponent } from './color-picker.component'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class ColorPickerService { private active: ColorPickerComponent | null = null;