Page History
...
- First you MUST remove all references to that directory/component from your theme's
lazy-theme.module.ts
eager-theme.module.ts
.For example, to delete the "./app/login-page" directory, you'd want to find which component(s) use that directory in your
lazy-theme.module.ts
file.If you search that file, you'd fine this reference:
Code Block import { LoginPageComponent } from './app/login-page/login-page.component';
That means you not only need to remove that "import" statement. You'd also need to remove all other references to "LoginPageComponent" in that same
lazy-theme.module.ts
file. So, you'd also need to remove it from the DECLARATIONS section:Code Block const DECLARATIONS = [ .... LoginPageComponent, .... ];
- Finally, delete the directory in question from your theme.
- At this point, you should rebuild/restart your UI to verify nothing has broken. If you did everything correctly, no build errors will occur.
- If you failed to edit your
lazy-theme.module.ts
correctly, you may see "Cannot find module [path-to-module]" errors which reference the directories that Angular/Node can no longer find in your theme. Either restore those directories, or remove the reference(s) from thelazy-theme.module.ts
similar to step 1 above.
- If you failed to edit your
Debugging which theme is being used
While you are working on themes, sometimes you may discover that it's difficult to tell which theme is being used to generate specific HTML elements. Luckily, there's an easy way to determine which theme is used on every HTML element.
Simply view the HTML source of the page, and look for the "data-used-theme" attribute. This attribute will tell you which named theme matched that HTML element. By default, a name of "base" references the core or "base" code ( under ./src/app) was used.
For example:
Code Block | ||||
---|---|---|---|---|
| ||||
<!-- This example shows the theme named "dspace" was used for the "themed-header-navbar-wrapper.component.ts" -->
<ds-themed-header-navbar-wrapper ... data-used-theme="dspace"></ds-themed-header-navabar-wrapper>
<main>
<!-- But, on the same page, the theme named "base" (core code) was used for the "themed-breadcrumbs.component.ts" -->
<ds-themed-breadcrumbs ... data-used-theme="base"></ds-themed-breadcrumbs>
</main> |
Additional Theming Resources
...