2014-09-13 43 views
0

JSON{{值}}是没有得到解决,在IE

[ 
    { 
    "1": "January", 
    "2": "February", 
    "8": "August", 
    "9": "Septemeber", 
    "10": "October", 
    "11": "November", 
    "12": "December" 
    }, 
    { 
    "2": "February", 
    "3": "March", 
    "4": "April", 
    "5": "May", 
    "6": "June", 
    "7": "July", 
    "8": "August" 
    } 
] 

HTML:

<select class='W1_Normal V4 A_{{$parent.$index}}' style="width:100px;" id="A_{{$parent.$index}}_{{$index}}" name="A_{{$parent.$index}}_{{$index}}" onchange="modifiyOtherDropDowns(this);removeErrorMessagesOfAllLowerDivsUsingObj(this)"> 
    <option value=""></option> 
    <option ng-repeat="(key, value) in ap" value="{{key}}">{{value}}</option> 
</select> 

在Firefox和铬,上面写代码工作正常,{{value}}是解决相应的价值。但在IE {{value}}正在显示为{{value}}

UPDATE:问题具体到IE8

enter image description here

+0

请勿使用ngRepeat构建选择,请使用[ngOptions](https://docs.angularjs.org/api/ng/directive/select)。 – Yoshi 2014-09-13 10:09:23

+0

您可以使用ng-class将模型绑定到css类。 IE在F12中显示javascript错误吗? – jao 2014-09-13 10:10:26

+1

你检查了这里的所有步骤https://docs.angularjs.org/guide/ie – 2014-09-13 10:11:53

回答

0

你应该阅读这article about using Angular with IE8 and earlier。有一些技巧你需要知道。每当我将IE8定位到Angular时,我都会避免写入元素指令,而是坚持使用属性指令。

+0

我同意你的意见,但这并不能为我的Qus提供答案。 – 2014-09-13 10:56:04

+0

我认为在这个链接点编号4是你的问题的答案 – Ahmer 2014-09-14 13:01:15

+0

是的艾默尔,它的确如此。但看到使用ng-repeat也是正确的方法。它是IE8引擎,它有一些错误,为什么它不能正确渲染{{variable}}。 – 2014-09-16 10:55:14

相关问题