Showing 1 – 4 of 4 replies
daniloteo

Color Service Stop Working after Update

daniloteo PURCHASED
2 years ago
Hi, i got an issue that can't solve by myself.

Everytime I update the angular version, the color themes stop working. Tried my projext in angular 11 version to 12, stoped work. Them I download the updated angular 12 original and clean templete and tried to upgrade from 12 to 13, same thing. Not only the selector of themes stop working, but can't change the default theme.

Thanks

Last edited 2 years ago

themicon
themicon SELLER
2 years ago
Hi, since Angular 13 is currently not supported by the template it could an issue that was not addressed yet. Would you mind to tell me if there's any error in console? The selector issue could be something related with the plugin itself not working correctly on v13 but the theme change issue could happen due to JS execution errors.
Unfortunately I don't have the Angular project ready to test on v13 which makes hard to offer support for version beyond the current one supported.

Thanks
Regards
daniloteo
daniloteo PURCHASED
2 years ago
Hi, I can't tell if it is a problem with Angular 13 since when I try to update from 11 to 12 I face the same issue. There are no error in console, so I think as you said is something to do with the plugin or JS execution, but I can't figure out wich :(
themicon
themicon SELLER
2 years ago
Im not sure to understand the issue, currently the template is on v12 which means you can check the code provided and see if in your case there's is something different. I mean, if you see no errors it means there's something missing or not correctly installed. Try comparing code to discard there's a difference in your implementation. Alternatively try checking the source with dev tools to see if the styles are correctly loaded for example.

Hope this helps
Regards
daniloteo
daniloteo PURCHASED
1 year ago
Sorry for the delay, was working in another project.

So, the problem was on theme.service.ts, in Angular 13 just changed the

"injectStylesheet(css) {
this.styleTag.innerHTML = css.default;
}"

to

"injectStylesheet(css) {
this.styleTag.innerHTML = css;
}"

and worked fine.

It got lot of problems in Angular 14, though. Probably cause had major break changes...

Last edited 1 year ago