diff --git a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts index 606bb0dafd..9323565f7f 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts @@ -20,10 +20,10 @@ import styles from './contants/styles'; import { ErrorHandler } from './handlers/error.handler'; import { chartJsLoaded$ } from './utils/widget-utils'; -import('chart.js').then(() => chartJsLoaded$.next(true)); - export function appendScript(injector: Injector) { const fn = function() { + import('chart.js').then(() => chartJsLoaded$.next(true)); + const lazyLoadService: LazyLoadService = injector.get(LazyLoadService); return forkJoin(