title: How can I change the background-color using ng-class?
body: <p>I am trying to change the background color whenever someone inputs a '5' while using ng-class.  I am really new to AngularJS and just writing things to get the hang of it. Am I supposed to use an ng-if somewhere or have to change my CSS?  Also where would I have to input the code?  I know it has to be somewhere where I filter the number but am totally lost on how to write the code. Please help!</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;body ng-init="numbers=[0,1,2,3,4,5]"&gt;
  &lt;nav&gt;
    &lt;a href="#" ng-click="tab='numbers'" ng-class="{active:tab=='numbers'}"&gt;Numbers&lt;/a&gt;
    &lt;a href="#" ng-click="tab='form'" ng-class="{active:tab=='form'}"&gt;Form&lt;/a&gt;
  &lt;/nav&gt;
  &lt;div ng-switch="tab"&gt;
    &lt;div ng-switch-when="numbers"&gt;
      &lt;input type="text" ng-model="myValue" /&gt;
      &lt;h1 ng-repeat="number in numbers | filter:myValue"}&gt;{{ number }}&lt;/h1&gt;
    &lt;/div&gt;
    &lt;div ng-switch-when="form"&gt;
      &lt;button ng-click="numbers.pop(); tab='numbers'"&gt;Pop&lt;/button&gt;
      &lt;button ng-click="numbers.push(numbers.length); tab='numbers'"&gt;Push&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>