title: User object to populate md-items in md-autocomplete
body: <p>I want to populate my md-autocomplete with an object containing user objects. It's retrieved in JSON format through a factory into <code>$scope.users</code>. I can check the object in my console using an Angular viewer.</p>
  
  <pre><code>users:
      user_id:
          display_name: "value"
          first_name: "value"
          last_name: "value"
      user_id:
          display_name: "value"
          first_name: "value"
          last_name: "value"
      etc...
  </code></pre>
  
  <p>I want the model value to be set to the <code>user_id</code> model and the display text to be <code>display_name</code>. Is this possible? I have tried (according to the <a href="https://material.angularjs.org/latest/api/directive/mdAutocomplete" rel="nofollow">documentation</a> only the <code>md-items</code> attribute should be required</p>
  
  <pre><code>&lt;md-autocomplete md-items="u in users"&gt;&lt;/autocomplete&gt;
  </code></pre>
  
  <p>But it doesn't do anything. Neither does following the "basic example"</p>
  
  <pre><code>&lt;md-autocomplete md-selected-item="videoInfo.lineUp.1" md-search-text="looseheadSearchText" md-items="u in users" md-item-text="u.display_name"&gt;&lt;/md-autocomplete&gt;
  </code></pre>
  
  <h2>EDIT</h2>
  
  <p>Here's the code I use to get my <code>users</code> object:</p>
  
  <pre><code>angular.module("app").controller("MainController", ["$scope", "userRepository", function ($scope, userRepository) {
      userRepository.get(function(data) {
          $scope.users = data;
      });
  
  app.factory("userRepository",
      function($resource) {
          return $resource("/wp-content/themes/zerif-lite-child/inc/get_users.php");
      });
  </code></pre>