Hi There,
I’m desperately trying to dynamically change the color of Ion-Toggle and Ion-Checkbox at runtime. I know I can change it to the a pre-defined sass variable like this:
<ion-toggle color="somePredefinedColor"></ion-toggle>
…but because there is a section in my app that adapts to the corporate design colors of a company (which it gets from server as hex-strings) this is not possible.
The closest I got was to query the document by the component’s class “.toggle-icon” and set its background color. This works at the first load but as soon as the page is loaded again it falls back to the sass predefined colors…
Please help me, I’ve just “wasted” a whole day trying to solve this. I know this kind of isn’t intended and there probably won’t be an easy way but god, there must be one…
Thanks a lot,
Best,
Milan