mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
added hal serializer
This commit is contained in:
42
src/app/core/core.module.ts
Normal file
42
src/app/core/core.module.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { NgModule, Optional, SkipSelf, ModuleWithProviders } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SharedModule } from "../shared/shared.module";
|
||||
import { isNotEmpty } from "../shared/empty.util";
|
||||
|
||||
const IMPORTS = [
|
||||
CommonModule,
|
||||
];
|
||||
|
||||
const DECLARATIONS = [
|
||||
|
||||
];
|
||||
|
||||
const EXPORTS = [
|
||||
];
|
||||
|
||||
const PROVIDERS = [
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [ ...IMPORTS ],
|
||||
declarations: [...DECLARATIONS],
|
||||
exports: [...EXPORTS],
|
||||
providers: [...PROVIDERS]
|
||||
})
|
||||
export class CoreModule {
|
||||
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
|
||||
if (isNotEmpty(parentModule)) {
|
||||
throw new Error(
|
||||
'CoreModule is already loaded. Import it in the AppModule only');
|
||||
}
|
||||
}
|
||||
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: SharedModule,
|
||||
providers: [
|
||||
...PROVIDERS
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user