title: AngularJS - multiselect options when model and options are different
body: <p>I have multiple select box for user to select his roles.</p>
  
  <pre><code>&lt;select ng-options="role.name for role in roles"
          ng-model="user.roles"
          multiple="multiple"&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p><strong>"roles"</strong> - is the list of roles that user can select</p>
  
  <p><code>[{"id":1,"name":"Moderator"},{"id":2,"name":"Admin"}]</code></p>
  
  <p><strong>"user.roles"</strong> - list of roles that user actually have</p>
  
  <p><code>{"id":5,"email":"la@la.la","roles":[{"id":2,"name":"Admin"}]}</code></p>
  
  <p>Both "roles" and "user" are loading dynamically via ajax.
  The problem is that when I load user that already have roles - they are not automatically selected in the select box. How do I select them?</p>