mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 02:54:13 +00:00
removed universal demo components
This commit is contained in:
52
src/app/shared/shared.module.ts
Normal file
52
src/app/shared/shared.module.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ApiService } from './api.service';
|
||||
import { ModelService } from './model/model.service';
|
||||
|
||||
const MODULES = [
|
||||
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
||||
CommonModule,
|
||||
RouterModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule
|
||||
];
|
||||
|
||||
const PIPES = [
|
||||
// put pipes here
|
||||
];
|
||||
|
||||
const COMPONENTS = [
|
||||
// put shared components here
|
||||
];
|
||||
|
||||
const PROVIDERS = [
|
||||
ModelService,
|
||||
ApiService
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
...MODULES
|
||||
],
|
||||
declarations: [
|
||||
...PIPES,
|
||||
...COMPONENTS
|
||||
],
|
||||
exports: [
|
||||
...MODULES,
|
||||
...PIPES,
|
||||
...COMPONENTS
|
||||
]
|
||||
})
|
||||
export class SharedModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: SharedModule,
|
||||
providers: [
|
||||
...PROVIDERS
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user