From 1b30f90f79b4ac0187baebee1ced73aa1d8dd601 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Wed, 11 Sep 2019 16:03:31 +0300 Subject: [PATCH] fix(theme-shared): move chart.js importing in the appendScript function --- .../packages/theme-shared/src/lib/theme-shared.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(