AngularJS - refresh ng-repeat

后端 未结 5 721
Happy的楠姐
Happy的楠姐 2021-02-02 07:05

I\'m using ng-repeat to display a collection of values. My filter options changes according to an ajax call to server. How can I refresh the ng-repeat after the filter parameter

5条回答
  •  孤街浪徒
    2021-02-02 07:26

    After receiving your filter called $scope.$apply() as following: It is refresh your scope.

    $scope.$apply(function() {
         // your code
    });
    

提交回复
热议问题