Recently, I encountered an issue while trying to change the background color of a pop-up window. My initial attempt using the [ngStyle]
attribute resulted in only changing the color of the backdrop rather than the desired pop-up. After some investigation, I discovered that applying the background-color attribute to the k-window class successfully changed the background color of the pop-up. However, I wanted this color change to be based on a specific condition.
I experimented with adding the class definition directly into the condition, but it seems that only the name of the class can be used in this way. Is there another method or workaround to achieve the desired background color change for the pop-up?
Here's an example of what I attempted:
<kendo-dialog [ngClass]="{'k-window{background-color:red}' : flag = true,'k-window{background-color:green}': flag = false">
</kendo-dialog>