title: Angularjs ng-select selected value not set
body: <p>I am trying to populate a form to edit a user list.</p>
  
  <p><strong>index.html:</strong></p>
  
  <pre><code>&lt;h1&gt;Users&lt;/h1&gt;
  &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;ID&lt;/th&gt;
              &lt;th&gt;Name&lt;/th&gt;
              &lt;th&gt;Role&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr data-ng-repeat="u in users" data-ng-click="select(u)"&gt;
              &lt;td&gt;{{u.id}}&lt;/td&gt;
              &lt;td&gt;{{u.username}}&lt;/td&gt;
              &lt;td&gt;{{u.role.title}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;form&gt;
      &lt;label for="inputUsername"&gt;Username&lt;/label&gt;
      &lt;input data-ng-model="selectedUser.username" id="inputUsername" type="text"&gt;
      &lt;select  data-ng-model="selectedUser.role"
               data-ng-options="r as r.title for r in roles"
               data-ng-change=""&gt;
      &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;pre&gt;{{selectedUser |json}}&lt;/pre&gt;
  </code></pre>
  
  <p><strong>controllers.js:</strong></p>
  
  <pre><code>angular.module('test-select')
          .controller('IndexCtrl',
          ['$scope', 'Restangular', function($scope, Restangular) {
                  $scope.selectedUser = null;
  
                  Restangular.all("roles").getList().then(function(roles) {
                      $scope.roles = roles;
                  });
                  Restangular.all("users").getList().then(function(users) {
                      $scope.users = users;
                  });
  
                  $scope.select = function(user) {
                      $scope.selectedUser = user;
                  };
              }]);
  </code></pre>
  
  <p>What I want to achieve is, when I click on a row on the table I can edit the selected user in the form (to save the new values) Everything works fine, except for the users role. If I click on a row, the selected user role is not updated.</p>
  
  <p>I think that has to do with the fact thaT the role list via Restangular call. Has anyone an Idea how I can solve this problem elegantly?</p>
  
  <p>PS: I am using angular 1.2-rc2.</p>
  
  <p>BR, Rene</p>