Hi Guys,

Angular 2/4 version

I have a getbootstrap* panel-heading with a title*  and my object is to *change 
the background color of the panel heading* based on the color code that 
comes with the record.

Records are pulled from a database and with each record, depending on the 
category the record belongs to it also bring with it a color code such as 
#b94a48. I like to change the panel-heading background-color to reflect the 
color code that came with the record. for argument sake:  category_color: 
#b94a48.

question, how can i dynamically change the background-color in the css so 
it can be reflected back to the panel-heading background-color



CSS:
.panel-default > .panel-heading {
   * background-color: #FFBABA; <!-- change this to  reflect 
category_color: #b94a48 -->*
    color: #b94a48;
    font-weight: bold;
  }



Part of the HTML
<div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"># {{*userDetailTitle*}}</h3>
            </div>
            <div class="panel-body">


Angular component.ts
  this.userDetailTitle = this.returnArray && this.returnArray[0].userId + ' 
User Details';











-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to