title: Angular - ng-repeat not working with search controller
body: <p>I have a search controller that I am using:</p>
  
  <pre><code>function searchRes($scope, $http, API, CarDetailService, $state){
  
    $scope.$watch('search', function() {
      fetch();
    });
  
    $scope.currentPage = 1;
    $scope.pageSize = 5;
  
    function fetch(){
      $http.get(API + "/search/" + $scope.search)
      .then(function(response){ 
        $scope.details = response.data;
      });
    }
  
    $scope.select = function(){
      this.setSelectionRange(0, this.value.length);
    }
  
    $scope.selectCar = function(carId) {
      CarDetailService.setCar(carId);
      $state.go('taskDetails');
    };
  
  }
  </code></pre>
  
  <p>Here is the HTML:</p>
  
  <pre><code>&lt;div ng-controller="searchRes" class="mainSearch"&gt;
  
    &lt;div class="searchBar"&gt;
      &lt;input type="text" ng-model="search" onclick="select()" placeholder="Enter Search Term" autofocus /&gt;
    &lt;/div&gt;
  
    &lt;div ng-repeat="res in details.Search"&gt;
      &lt;div&gt;{{ res['Display Name'] }}&lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>ng-repeat="res in details"
  ng-repeat="res in response.data"
  ng-repeat="res in data"
  ng-repeat="res in response"
  ng-repeat="res in response.data.Results"
  ng-repeat="res in details.data.Results"
  </code></pre>
  
  <p>Here is an image of what the API returns (data.Results):</p>
  
  <p><a href="https://i.stack.imgur.com/UhMFL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UhMFL.jpg" alt="enter image description here"></a></p>
  
  <p><strong>EDIT</strong> when I do a console.log(response); I can see all the JSON data being returned (data.Results)</p>
  
  <p>I know I am obviously not calling the data properly but I don't know what else to try which i guess is why I am here.</p>