Code Review
/
src
/
xds
/
xds-agent.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
New dashboard look & feel
[src/xds/xds-agent.git]
/
webapp
/
src
/
app
/
@core-xds
/
module-import-guard.ts
diff --git a/webapp/src/app/@core-xds/module-import-guard.ts
b/webapp/src/app/@core-xds/module-import-guard.ts
new file mode 100644
(file)
index 0000000..
445640c
--- /dev/null
+++ b/
webapp/src/app/@core-xds/module-import-guard.ts
@@ -0,0
+1,5
@@
+export function throwIfAlreadyLoaded(parentModule: any, moduleName: string) {
+ if (parentModule) {
+ throw new Error(`${moduleName} has already been loaded. Import Core modules in the AppModule only.`);
+ }
+}