关于angularjs在ie中显示的问题。

最近在开发中遇到一个问题,是关于angularjs在ie中显示的问题,下面贴代码。

$xx.push({times:(sum/sumSrece*100).toFixed(2) + "%",time:$scope.sendDatatime,color:sum/sumSrece,number:'0.985',assess:'98.5%',timeS:(sumOne/sumSreceTwo*100).toFixed(2) + "%",colors:sumOne/sumSreceTwo});

angular.forEach(xx,function(rec){

              if(rec.colors < rec.number && rec.colors>0){
                rec.styles='background-color:#FF9900' 
              }else if (rec.colors == rec.number || rec.colors>rec.number){
                rec.styles='background-color:#008100'
              }else{
                rec.styles='background-color:#DCE5F2'
              }
            })
            

前端代码:


<tr ng-repeat="rece in xx">
              <td ng-if="!massShow" style={{rece.style}}>{{rece.times}}</td>
            </tr>
            

谷歌中样式:
clipboard.png

ie中样式:

clipboard.png

ie中提示:

clipboard.png

这里怎么解决?求大神指导一下。。

阅读 2k
1 个回答

最后,运用ng-class解决了这个问题。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题