ng-repeat with http.get 不更新

ng-repeat with http.get not updating

我在我的控制器中有一个简单的 http.get 调用,如下所示

$scope.data = {};
$scope.data.displayBean = {};
$scope.fetchEventDetails = function() {
  $http.get('http://localhost:8080/api/v1/event_details?eventId=' + $scope.data.selectedEventId)
    .then(function(theEvent){
      $scope.data.displayBean = theEvent;
  });
};

在我看来,我使用了如下 ng-repeat

<div class="list-group" data-ng-controller="MainCtrl">
<a href="#" class="list-group-item" ng-repeat="(key,val) in data.displayBean">
  <h5 class="list-group-item-heading">{{key}}</h5>
  <p class="list-group-item-text">{{val}}</p>
</a>
</div>

但它似乎没有更新视图,即使我在将它登录到控制台时从 API 调用中得到响应。

我在这里遗漏了什么吗?

$scope.data = {};
$scope.data.displayBean = {};
$scope.fetchEventDetails = function() {
  $http.get('http://localhost:8080/api/v1/event_details?eventId=' + $scope.data.selectedEventId)
    .then(function(theEvent){
      $scope.data.displayBean = theEvent.data;
  });
}

你能试试吗 $scope.data.displayBean = theEvent.data;