项目初始化
This commit is contained in:
6
src/app/core/module-import-guard.ts
Normal file
6
src/app/core/module-import-guard.ts
Normal file
@ -0,0 +1,6 @@
|
||||
// https://angular.io/guide/styleguide#style-04-12
|
||||
export function throwIfAlreadyLoaded(parentModule: any, moduleName: string): void {
|
||||
if (parentModule) {
|
||||
throw new Error(`${moduleName} has already been loaded. Import Core modules in the AppModule only.`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user