I have an angular web app where my html is as follows:
<p class="news-source" style="background-color: {{news.backgroundColor}}">{{news.source.title}}</p>
My component has the following :
this.news = new News()
this.news.backgroundColor = '#E6E6CA'
However, I see that the color does not get set if I use {{news.backgroundColor}}. What is the correct way to set the background color?
style="background-color: #E6E6CA"
This works if I use the hex directly. But, I want to use news.backgroundColor to set the color. So, wondering what is the correct usage.