角度IE8$index问题

Angular IE8 $index issue

本文关键字:问题 index IE8 角度      更新时间:2023-09-26

我构建了一个中继器,它可以制作几个元素并将它们放在彼此之上。

在现代浏览器中,这就像我预期的那样工作,但在IE8中,它有问题并且不会解析样式部分(我认为样式属性的内容无效,这就是它不显示的原因)。

它涉及以下元素:

<div class="leaf" ng-repeat="j in getNumber(number2) track by $index" 
    style="bottom: [[$index * 3 + 20]]px"></div>

没有人遇到同样的问题,并且有适当的解决方法或其他方法。

这是最终有效的:

    <div class="leaf" ng-repeat="j in getNumber(number2) track by $index" ng-style="
        {'bottom': '[[$index * 3 + 20]]px'}"></div>