AngularJS - refresh ng-repeat

后端 未结 5 799
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:36

    I didnt need to use $scope.apply() to see the update. What solved this error for me was to make sure:

    1. The update was being called from inside the controller.
    2. The controller that called the update was the same that contained the ng-repeat.

提交回复
热议问题