我可以使用角度js ng-repeat和turn.js吗? [英] can I work with angular js ng-repeat and turn.js?

查看:182
本文介绍了我可以使用角度js ng-repeat和turn.js吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用turn.js和angular.js制作杂志



我正在使用angular来解析json文件并提取图像路径在我的视图中使用它的一个$ scope变量与ng-repeat和turn.js来制作翻页动画,使div看起来像一本杂志。



但它不会生成翻书,只需一个接一个地绘制图像。



请帮忙!我将代码放在这里



HTML



 < div id =flipbookclass =flipbookng-repeat =slide in slides> 
< div>< img src ={{slide.path_main}}>< / div>
< / div>


< / div>

Flipbook init

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


解决方案

通过在内部添加ngrepeat flipbok的div!这是一件非常愚蠢的事情,但现在我有了我的翻书书!{/ b>

I'm trying to make a magazine using turn.js and angular.js

I'm using angular to parse the json file and extract the image path for using it in a $scope variable in my view with ng-repeat and the turn.js to make the flipbook animation to make the div look like a magazine.

But it doesnt generate the flipbook and just draw the images one after other.

Please help! I put the code right here

HTML

       <div id="flipbook" class="flipbook"ng-repeat="slide in slides">
        <div><img src="{{slide.path_main}}"></div>
       </div>      


</div>

Flipbook init

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

解决方案

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!

这篇关于我可以使用角度js ng-repeat和turn.js吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆