title: How to make AngularJS TODO example work in IE9 the same as it works in IE8, Chrome, Firefox?
body: <p>I did follow <strong>Angular JS TODO example</strong> and posted my code on JSFiddle (with AngularJS v1.0.3):
  <a href="http://jsfiddle.net/7w689/" rel="nofollow">http://jsfiddle.net/7w689/</a></p>
  
  <p>I cannot figure out why it doesn't work in IE9 as expected.
  It works in IE8, Chrome and Firefox but does have a different behavior in IE9 as described below.</p>
  
  <p><strong>Observed behavior in IE8, Chrome and Firefox:</strong>
  When page is loaded first time clicking on any TODO checkbox in the TODO list will modify CSS class for TODO item (.done-true versus .done-false) and will update "Remaining todos" number.</p>
  
  <p><strong>Observed behavior in IE9:</strong>
  When page is loaded first time clicking on any TODO checkbox in the TODO list will NOT modify CSS class for TODO item (.done-true versus .done-false) and will NOT update "Remaining todos" number.
  Only after each item in the list is checked and unchecked several times it will start working.
  Unclear why this is happening and how to make it behave the same in IE9 as in IE8 and other browsers.</p>
  
  <p>One can reproduce this behavior by using Development Tools in IE9 and selecting Browser Mode: IE9, Document Mode: IE9 standards (versus Document Mode: IE8 standards). </p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div ng-app&gt;        
  &lt;div ng-controller="TodoCtrl"&gt;
  
      &lt;span&gt;Total number of todos: {{todos.length}}&lt;/span&gt;&lt;br /&gt;
      &lt;span&gt;Remaining todos: {{(todos | filter: {done: false} ).length}}&lt;/span&gt;&lt;br /&gt;
  
      &lt;ul&gt;
          &lt;li ng-repeat="todo in todos"&gt;
              &lt;input type="checkbox" ng-model="todo.done" id="chk{{$index}}"/&gt; 
              &lt;label for="chk{{$index}}" ng-class="{'done-true': todo.done, 'done-false': !todo.done}"&gt;
                  {{todo.text}} | {{todo.done}}
              &lt;/label&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  
      &lt;form&gt;
          &lt;input type="text" ng-model="todoText" 
                 size="30" placeholder="add new todo here"/&gt;
          &lt;button ng-click="addTodo()"&gt;Add&lt;/button&gt;
      &lt;/form&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;    
  </code></pre>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>function TodoCtrl($scope) {
  
      $scope.todos = [
          { text: 'task 1', done: true },
          { text: 'task 2', done: false }
      ];
  
      $scope.addTodo = function ()
      {
          $scope.todos.push({ text: $scope.todoText, done: false });
          $scope.todoText = "";
      };
  
  }
  </code></pre>
  
  <p><strong>CSS:</strong></p>
  
  <pre><code>.done-true {text-decoration: line-through;  color: grey;}
  .done-false {text-decoration: none;  color: red;}
  </code></pre>