[lucide-angular] Added factory to LUCIDE_ICONS injection token so that standalone components will be able to import LucideAngularModule. (#1529)

This commit is contained in:
Karsa
2023-08-25 08:43:16 +02:00
committed by GitHub
parent 5f442122ab
commit 30a69ee670
@@ -6,7 +6,12 @@ export interface LucideIconProviderInterface {
getIcon(name: string): LucideIconData|null;
}
export const LUCIDE_ICONS = new InjectionToken<LucideIconProviderInterface>('LucideIcons');
export const LUCIDE_ICONS = new InjectionToken<LucideIconProviderInterface>(
'LucideIcons',
{
factory: () => new LucideIconProvider({})
}
);
export class LucideIconProvider implements LucideIconProviderInterface {
constructor(private icons: LucideIcons) {