css - Change Background Color with Angular -


I know that it should be easy - I'm trying to change the background color of the div based on variables {{ Site.bool}} is going to be right or wrong.

  
list
list group group item col-md-8 pull-left "ng-repeat =" link in the site list "> gt; & lt; h3 & gt; ; {{Site.name}} & lt; em class = "pull-right" & gt; {{site.url}} & lt; / em> {{site.description}} & lt; product-tab & Gt; & lt; / product-tab & gt; & lt; / h3 & gt; & lt; / div & gt;

thanks,

You can assign a class to the div dynamically like this:

     

if trueOrFalseVariable is correct or false , Then it depends on that

The square
Then this is a simple matter of setting up the .cool {} CSS rules in your stylesheet.

You can enter ng-class Read all about and you may also want to read about it!

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -