title: AngularJS ng-style is not working
body: <p>I am trying to apply background color on a <code>div</code> using AngularJS <code>ng-style</code>. My colors are coming from a database. It is not working for me. Can anybody help me. </p>
  
  <pre><code>&lt;div ng-controller="IndexCtrl"&gt;
      &lt;div style="width: 500px;"&gt;
          &lt;table class="table table-striped table-bordered table-condensed table-hover"&gt;
              &lt;thead&gt;      
                  &lt;tr&gt;
                      &lt;th&gt;ID&lt;/th&gt;
                      &lt;th&gt;Name&lt;/th&gt;
                      &lt;th&gt;Edit&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
              &lt;tbody ng-repeat="color in colors"&gt;
                  &lt;tr ng-show="edit"&gt;
                      &lt;td&gt;&lt;input type="text" ng-model="color.ID" ng-change="color.changed=true" /&gt;&lt;/td&gt;
                      &lt;td&gt;
                          &lt;input type="text" ng-model="color.Name" colorpicker ng-change="color.changed=true" /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;&lt;input type="button" class="btn btn-primary" value="Save" ng-click="edit=false; save();" /&gt; &lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr ng-hide="edit"&gt;
                      &lt;td&gt;&lt;strong&gt;{{color.ID}}&lt;/strong&gt; &lt;/td&gt;
                      &lt;td&gt;&lt;div style="width:20px; height:20px; border:thin solid black" ng-model="color.Name" ng-style="{'background-color' : color.Name}"&gt;&lt;/div&gt; &lt;/td&gt;
                      &lt;td&gt;&lt;input type="button" class="btn btn-primary" value="Edit" ng-click="edit=true;" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>