我需要更新一个随时间动态变化的图像的变换旋转值
我试过类似下面的方法,但没有用
style="transform: rotate(imagerotation ? imagerotation : 0 + deg);"
实现此目标的正确方法是什么?
最佳答案
试试这个:
[style.transform]="'rotate(' + (imagerotation ? imagerotation : 0) + 'deg)'"
关于angular2动态改变style属性值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40066131/