鍍金池/ 問(wèn)答/HTML5  HTML/ 關(guān)于angularjs在ie中顯示的問(wèn)題。

關(guān)于angularjs在ie中顯示的問(wèn)題。

最近在開(kāi)發(fā)中遇到一個(gè)問(wèn)題,是關(guān)于angularjs在ie中顯示的問(wèn)題,下面貼代碼。

$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

這里怎么解決?求大神指導(dǎo)一下。。

回答
編輯回答
巫婆

最后,運(yùn)用ng-class解決了這個(gè)問(wèn)題。

2018年3月27日 05:11