All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
Now, you need to "register" that folder component in one of your theme's module files: lazy-theme.module.ts or eager-theme.module.ts. For performance it's best to put as many components into lazy-theme.module.ts as that means they'll only be downloaded if they're needed. Components in eager-theme.module.ts are included in the initial JS download for the app, so you should only add components there that are necessary on every page, such as the header and footer, these DECLARATIONS
array. You should also include components using one of our custom decorators (such as @listableObjectComponent), because those decorators need to be registered when the app starts to be able to be picked up. These ENTRY_COMPONENTS
array, which will both declare them as well as ensure they're loaded when the app starts.
file. Add an import of the new component file, or copy the corresponding import from or copy the corresponding import from "src/themes/custom/lazy-theme.module.ts" or "src/themes/custom/lazyeager-theme.module.ts". For For example, the Footer Component import would look can be found in "src/themes/custom/eager-theme.module.ts" and looks like this:
Code Block |
---|
import { FooterComponent } from './app/footer/footer.component'; |
In that same "lazy-theme. module .ts" file, also add this imported component to the "DECLARATIONS" section. (Again, you can optionally look in "src/themes/custom/lazy-theme.module.ts" the custom theme's module files to see how its done). For example, the Footer Component would then be added to the list of DECLARATIONS (the order of the declarations list doesn't matter):
Code Block |
---|
const DECLARATIONS = [ .... FooterComponent, .... ]; |
DECLARATIONS
array
ENTRY_COMPONENTS
array...