【发布时间】:2018-10-31 16:00:31
【问题描述】:
只有在 IE 中加载页面时出现此问题,在 Chrome/FF/Edge 中正常。
我有以下...
$scope.getOtherInfo = function (appID) {
$scope.otherInfo = $scope.applications.filter(e => e.ApplicationId === appID).map(function (el) {
return ({
AppID: appID,
Title: el['Title'].replace(/ /g, '')
});
});
};
(applications是一个多维数组,此时otherInfo为null)
这在 Chrome 等中运行良好,可以调用它的工作等。在 IE 中,虽然在页面加载时我得到了
SCRIPT1002:语法错误 jsFile.js (98,58)
指向下一行
$scope.otherInfo = $scope.applications.filter(e => e.ApplicationId === appID).map(function (el) {
我不确定如何进一步分解线路以尝试准确调试它不喜欢的内容。
【问题讨论】:
-
现在 IE 中有箭头符号。 (使用Babel.js编译你的JS代码)写成
.filter(function (e) { return e.ApplicationId === appID; })等
标签: angularjs internet-explorer filter