mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DSC-370] Fix SSR issue with submission after migrate to angular 11
This commit is contained in:
@@ -65,6 +65,14 @@ const DECLARATIONS = [
|
|||||||
SubmissionImportExternalCollectionComponent
|
SubmissionImportExternalCollectionComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const ENTRY_COMPONENTS = [
|
||||||
|
SubmissionSectionUploadComponent,
|
||||||
|
SubmissionSectionformComponent,
|
||||||
|
SubmissionSectionLicenseComponent,
|
||||||
|
SubmissionSectionCcLicensesComponent,
|
||||||
|
SubmissionSectionDetectDuplicateComponent
|
||||||
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -88,4 +96,14 @@ const DECLARATIONS = [
|
|||||||
* This module handles all components that are necessary for the submission process
|
* This module handles all components that are necessary for the submission process
|
||||||
*/
|
*/
|
||||||
export class SubmissionModule {
|
export class SubmissionModule {
|
||||||
|
/**
|
||||||
|
* NOTE: this method allows to resolve issue with components that using a custom decorator
|
||||||
|
* which are not loaded during CSR otherwise
|
||||||
|
*/
|
||||||
|
static withEntryComponents() {
|
||||||
|
return {
|
||||||
|
ngModule: SubmissionModule,
|
||||||
|
providers: ENTRY_COMPONENTS.map((component) => ({provide: component}))
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user