I am working on Angular and is trying to set this div background color dynamically based on the color specified by "cardData.color"
.
E.g.
cardData = {id: '1', color: '#202020'};
I've tried the code shown below but it doesn't work.
<div style="background-color: {{cardData.color}}; padding: 10px 20px;"></div>
Is there any way, I can set the background color dynamically based on the object's color?? Thank you.