From 728e9236aeb443d74f93818288d5c3ef0996caf5 Mon Sep 17 00:00:00 2001 From: Sylvain DEDIEU Date: Fri, 9 Feb 2024 19:34:27 +0100 Subject: [PATCH] fix(316, 326, 256, 252, 243, and more): provide color-picker service in root --- projects/lib/src/lib/color-picker.module.ts | 1 - projects/lib/src/lib/color-picker.service.ts | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) 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;