title: How to apply class to div dynamically using AngularJS
body: <p>I want to switch to div with class="col-md-x" depending upon the number of student object i am receiving. 
  E.x: <a href="http://jsfiddle.net/90jyghq6/" rel="nofollow">Sample</a></p>
  
  <ol>
  <li><p>if i am getting only one JSON object then i want to a div with class should be like(class="col-md-12").</p></li>
  <li><p>if am getting two JSON object then i want to switch to a div with class="col-md-6".</p></li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-12"&gt;
              &lt;div clss="row"&gt;
                  &lt;div ng-repeat="c in vm.students" class="col-md-12"&gt;
                      &lt;div calss="thimbnail"&gt;
                          &lt;div class="Option div 1"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div ng-repeat="c in vm.students" class="col-md-6"&gt;
                      &lt;div calss="thimbnail col-md-"&gt;
                          &lt;div class="Option div 2"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                   &lt;div ng-repeat="c in vm.students" class="col-md-4"&gt;
                      &lt;div calss="thimbnail col-md-"&gt;
                          &lt;div class="Option div 3"&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>