0

我一直无法专门在 IE8 中呈现列表。所有其他浏览器都按预期执行以下代码,但是,IE8 完全忽略了该功能。非常感谢任何提示、建议和/或解决方案,干杯。

alert("workflow.js"+ " this call goes off in IE8");

$scope.makeAndGetList = function(list) {
    //todo: lj: IE8 doesn't make it here
    //alert("workflow.js"+ " no IE");
    var parts = list.split('.'),
        current = $scope.workflow;

    _.each(parts, function(part, index) {
        if (current[part] == undefined) {
            current[part] = (index == parts.length - 1) ? [] : {};
        }
        current = current[part];
        //todo: lj: IE8 doesn't make it in here
        // app.appAlert("workflow.js"+ " line 19");
    });

alert("workflow.js - this functions correctly executes in IE8");

这是所要求的 HTML:

<sa-list list="makeAndGetList('areas_of_need')" edit="true" model="areas_of_need" array-mode="true">
    <sa-lookup style="multiselect" override="false" list="areas_of_need.terms" model="areas_of_need" model-key="need" label="{{locale.iprc.areas_of_strengths_and_needs.needs}}"></sa-lookup>
</sa-list>
4

3 回答 3

3

不确定这是否是您的问题(您可以发布带有指令的 jsfiddle 吗?),但这是一种可能性。IE 8 只能将角度指令作为属性(而不是元素)来处理。幸运的是,将 angular 元素更改为属性很容易。例如,对于指令“saList”,其中 html 表示<sa-list>,将 html 重写为<div sa-list>(并确保您的指令具有属性restrict: 'A',而不是restrict: 'E')。在此处查看示例(适用于 IE 8):http: //jsfiddle.net/dannystaten/hQn9F/

于 2012-11-22T02:11:28.507 回答
2

看看我为 angular-ui 项目编写的ieshiv 。为您提供一种简单的合并方式。

于 2012-10-15T17:02:39.787 回答
0

也尝试升级到 Angular UI Bootstrap 的 0.2.0 版本。我在“警报”控制方面遇到了类似的问题。将其升级到 0.2.0 并将其用作属性后解决了我的问题

于 2013-04-05T18:23:43.267 回答