mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge remote-tracking branch 'alex-upstream/w2p-115051_themed-admin-search-page_contribute-7.4' into w2p-131441_backport-3065-8
This commit is contained in:
43
src/app/admin/admin-workflow-page/admin-workflow.module.ts
Normal file
43
src/app/admin/admin-workflow-page/admin-workflow.module.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { SearchModule } from '../../shared/search/search.module';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
import { AdminWorkflowPageComponent } from './admin-workflow-page.component';
|
||||
import { WorkflowItemSearchResultAdminWorkflowGridElementComponent } from './admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component';
|
||||
import { WorkflowItemSearchResultAdminWorkflowListElementComponent } from './admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component';
|
||||
import { WorkflowItemAdminWorkflowActionsComponent } from './admin-workflow-search-results/workflow-item-admin-workflow-actions.component';
|
||||
import { ThemedAdminWorkflowPageComponent } from './themed-admin-workflow-page.component';
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
// put only entry components that use custom decorator
|
||||
WorkflowItemSearchResultAdminWorkflowListElementComponent,
|
||||
WorkflowItemSearchResultAdminWorkflowGridElementComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SearchModule,
|
||||
SharedModule.withEntryComponents(),
|
||||
],
|
||||
declarations: [
|
||||
ThemedAdminWorkflowPageComponent,
|
||||
AdminWorkflowPageComponent,
|
||||
WorkflowItemAdminWorkflowActionsComponent,
|
||||
...ENTRY_COMPONENTS,
|
||||
],
|
||||
exports: [
|
||||
AdminWorkflowPageComponent,
|
||||
],
|
||||
})
|
||||
export class AdminWorkflowModuleModule {
|
||||
/**
|
||||
* NOTE: this method allows to resolve issue with components that using a custom decorator
|
||||
* which are not loaded during SSR otherwise
|
||||
*/
|
||||
static withEntryComponents() {
|
||||
return {
|
||||
ngModule: SharedModule,
|
||||
providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user