尽管未应用$ apply,但视图未更新angularjs变量已更改

时间:2019-07-10 10:34:43

标签: angularjs

视图未更新,但变量已更改

EmployeeModule

查看

setTimeout(function(){
$scope.$apply(function(){

    $scope.filteredUserphotos = $scope.alluserphotos.slice(0, $scope.pagination.pageSize);
    console.log($scope.filteredUserphotos[0].albumaddress)

})

}, 1000)

{{filteredUserphotos[0].albumaddress}} <brick-wall bricks="filteredUserphotos" item="photo"> <a href="/details/{{photo._id}}/{{photo.images.publicid}}"> <div class="thum_photo"> <img src="{{photo.config.ftpFullPath}}{{photo.config.crop300}}{{photo.images.publicid}}.{{photo.images.fileExtension}}"> </div> </a> </brick-wall> 是数组

当我console.log变量。我看到filteredUserphotos发生了变化。但是视图不是更新。甚至filteredUserphotos仍然没有改变

0 个答案:

没有答案