AngularJS $scope updates not reflected in the view

前端 未结 2 1328
刺人心
刺人心 2021-01-14 07:20

Firstly I am sorry if I will be confusing, but I\'m solving this issue the whole evening, and I\'ve read dozens of SO questions and AngularJS articles, so I\'m not even sure

2条回答
  •  既然无缘
    2021-01-14 07:33

    Can you try the following?

    Change the way you are using $http.post (at both places). Try to use it like:

    $http.post($scope.url, {'filterType': 'abc', 'letter': $routeParams.letter}).success(function(data) {
       $scope.listItems = data;
    });
    

    This means your ng-repeat changes slightly:

    ng-repeat="item in listItems"
    

提交回复
热议问题