Files
dspace-angular/src/app/submission/sections/sections-decorator.ts
2018-07-26 18:36:36 +02:00

17 lines
431 B
TypeScript

import { SectionsType } from './sections-type';
const submissionSectionsMap = new Map();
export function renderSectionFor(sectionType: SectionsType) {
return function decorator(objectElement: any) {
if (!objectElement) {
return;
}
submissionSectionsMap.set(sectionType, objectElement);
};
}
export function rendersSectionType(sectionType: SectionsType) {
return submissionSectionsMap.get(sectionType);
}