I am changing the application theme dynamically on runtime, so when i use kendo button with property "themeColor="primary" , its not taking the dynamic theme colour of the application.
Application theme is default-ocean-blue, butits taking orange colour for button menu.
1 Answer, 1 is accepted
0
Yanmario
Telerik team
answered on 29 May 2024, 01:09 PM
Hi Vaishaly,
Thank you for the provided details.
We are not sure how the theme was changed. I tried to replace the CDN of the theme as described in the following article:
In your example on button click you are changing the theme, but my requirement is i have to set a new theme based on the environment in which the application is running (eg: local, dev, production).
So for that i tried to change/set the theme in app.component.ts based on environment, and i am expecting wherever component I use kendo component with "themeColor="primary" it should apply the theme accordingly (theme set as per in app.component.ts).
Not sure that this the correct approach. Kindly help me to get this scenario to work.
Yanmario
Telerik team
commented on 31 May 2024, 06:48 AM
Hi Vaishaly,
Changing the themes depending on the environment would be more towards configuring how Angular handles the styles depending on the environment. I would suggest checking out angular.json config which should provide you the option to load different stylesheets depending on the environment and also researching this matter from some online resources like: