From 30a69ee670bc73dbedd92032a9d3a678809dbbb0 Mon Sep 17 00:00:00 2001 From: Karsa Date: Fri, 25 Aug 2023 08:43:16 +0200 Subject: [PATCH] [lucide-angular] Added factory to LUCIDE_ICONS injection token so that standalone components will be able to import LucideAngularModule. (#1529) --- packages/lucide-angular/src/lib/lucide-icon.provider.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/lucide-angular/src/lib/lucide-icon.provider.ts b/packages/lucide-angular/src/lib/lucide-icon.provider.ts index 7549c3c89..ce4fcc5e4 100644 --- a/packages/lucide-angular/src/lib/lucide-icon.provider.ts +++ b/packages/lucide-angular/src/lib/lucide-icon.provider.ts @@ -6,7 +6,12 @@ export interface LucideIconProviderInterface { getIcon(name: string): LucideIconData|null; } -export const LUCIDE_ICONS = new InjectionToken('LucideIcons'); +export const LUCIDE_ICONS = new InjectionToken( + 'LucideIcons', + { + factory: () => new LucideIconProvider({}) + } +); export class LucideIconProvider implements LucideIconProviderInterface { constructor(private icons: LucideIcons) {