can I work with angular js ng-repeat and turn.js?

☆樱花仙子☆ 提交于 2019-12-06 16:48:22

I don't believe there is a renderComplete event or anything like that in angular; you may have to use $timeout as suggested here.

// i'm taking assumptions with your code, but...

$scope.slides = [];

$http.get('/data/slides.json').success(function(data){

  $scope.slides = data;

  $timeout(function(){

    $("#flipbook").turn({
      width: 1724,
      height: 772,
      autoCenter: true
    });

  }, 0);

});

I figure it out by adding the ngrepeat in the inner div of the flipbok! It was such a silly thing but now I have my flipbook perfct!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!