【发布时间】:2014-11-07 10:42:30
【问题描述】:
JSON:
[
{
"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 和 Chrome 中,上面编写的代码工作正常,{{value}} 正在解析相应的值。但在 IE 中,{{value}} 显示为 {{value}}!
更新:IE8 特有的问题
【问题讨论】:
-
不要使用 ngRepeat 来构建选择,使用ngOptions。
-
您可以使用 ng-class 将模型绑定到 css 类。 IE 是否在 F12 中显示 javascript 错误?
-
你检查过这里的所有步骤吗docs.angularjs.org/guide/ie
-
@Yoshi 我知道,我使用 ng-repeat 犯了一个错误。但这与我面临的问题有什么关系吗?
-
IE 兼容模式可能是问题所在。 stackoverflow.com/questions/3449286/…
标签: javascript angularjs