title: AngularJS : update bindings ng-bind-html
body: <p>I've go a problem with binding. I use the "ng-bind-html" directive, because the details text of the object to display contains HTML code. Unfortunatly the text doesn't update when the object changes. 'title' and 'kurztext' change its values but 'langtext' (the html bound) not. Here's the code I use:</p>
  
  <pre><code>&lt;div class="content scrollContainer" ng-model="selectedItem"&gt;
      &lt;h2 class="header"&gt;{{selectedItem.titel}}&lt;/h2&gt;
      &lt;div class="kurztext" ng-show="selectedItem.kurztext"&gt;{{selectedItem.kurztext}}&lt;/div&gt;
      &lt;div class="langtext" ng-bind-html="selectedItem.langtext"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In Javascript I just pick an object out of an array and assign it to $scope.selectedItem to change the displayed item. Here's my JS code (should not be relevant to the problem):</p>
  
  <pre><code>var items;
  
  var app = angular.module("app", ["ngSanitize"]);
  
  app.controller("MainCtrl", function ($scope, $sce){
      $scope.items = items;
      $scope.selectedItem = $scope.items[0];
  
      $scope.showItem = function(item){ // called on click on list item
          $scope.selectedItem = item;
      }
  
      $scope.openItemLink = function(id){
          for (var i=0; i&lt;$scope.items.length; i++){
              if ($scope.items[i].uid==id){
                  $scope.showItem($scope.items[i]);
                  break;
              }
          }
      }
  
      $scope.getLink = function(id){
          var it = 0;
          for (var i=0; i&lt;$scope.items.length; i++){
              if ($scope.items[i].uid==id){
                  it = $scope.items[i];
                  return it.titel;
              }
          }
          return "----";
      }
  });
  </code></pre>
  
  <p>Any ideas?</p>