diff options
Diffstat (limited to 'client/src/app/core/module-import-guard.ts')
-rw-r--r-- | client/src/app/core/module-import-guard.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/core/module-import-guard.ts b/client/src/app/core/module-import-guard.ts new file mode 100644 index 000000000..445640c4f --- /dev/null +++ b/client/src/app/core/module-import-guard.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export function throwIfAlreadyLoaded(parentModule: any, moduleName: string) { | ||
2 | if (parentModule) { | ||
3 | throw new Error(`${moduleName} has already been loaded. Import Core modules in the AppModule only.`); | ||
4 | } | ||
5 | } | ||