Hello,
I just tried to set up the https://keenthemes.com/products/ceres-html-pro theme into an Angular project. I built the yarn and gulp files, and then I copied and pasted the assets into my Angular project.
Here, I have two issues:
1. Angular and the theme assets are found, but I get this error: Uncaught TypeError: Cannot read properties of undefined (reading 'on') which says that KTThemeMode cannot be found in js line: "KTThemeMode.on("kt.thememode.change", function()".
2. Since I copied and pasted the whole theme assets, I ended up with 2000+ new files in my hit repo. How can I filter only the assets I need without taking them one by one? Is there a cdn I could use?
Please let me know, guys, what am I doing wrong. Thank you!
Hi,
Make sure that the script files are loaded in the correct order. Ensure that the script containing KTThemeMode is loaded after its dependencies. Check if there are any missing dependencies in your Angular project that are required by the theme.
Verify that the script containing KTThemeMode is indeed loaded by checking the Network tab in your browser's developer tools.
To troubleshoot the issue, consider integrating the theme in smaller parts.
As a first step, you can start by integrating the CSS files. Copy the following folders and files into your Angular project:
Copy contents of assets/plugins/global/* to your project.
Specifically, look for plugins.bundle.css.
Copy contents of assets/css/* to your project.
Look for styles.bundle.css.
By integrating the CSS files first, you can identify and address any styling issues or conflicts that may arise. Once the styling is applied successfully, you can proceed to integrate the JavaScript part by part to pinpoint any potential JavaScript-related issues.
Remember to adjust the file paths in your Angular project to match the structure of your project.
Feel free to reach out if you encounter any specific challenges during the integration process.