ng-grid未在IE 11中显示

时间:2015-06-27 12:08:38

标签: javascript java angularjs internet-explorer servlets

我已经看到过关于IE 8以及之前的ng-gird问题的问题,我也看到了this。但我的chrome和firefox中的代码仍然如下所示:

enter image description here

在IE 11中看起来像这样:

enter image description here

我对ng-grid的html是:

<div class="gridStyle" ng-grid="gridOptions">
    <h2 dir="rtl">&nbsp;&nbsp;&nbsp;
        گزارش خرید لحظه ای از پذیرنده
    </h2>
</div>

并在我的控制器中:

$scope.gridOptions = {
    data: 'chartData', columnDefs: [
        {
            field: "stan", displayName: "شماره پیگیری",
            width: '13%'
        },
        {
            field: "mobileNo", displayName: "شماره موبایل خریدار",
            width: '15%'
        },
        {
            field: "terminalType", displayName: "نوع پایانه",
            width: '8%'
        },
        {
            field: "terminalNo", displayName: "شماره پایانه",
            width: '10%'
        },
        {
            field: "rrn", displayName: "شماره ارجاع",
            width: '17%'
        },
        {
            field: "amount", displayName: "مقدار(ریال)",
            width: '17%'
        },
        {
            field: "date", displayName: "تاریخ",
            width: '10%'
        },
        {
            field: "time", displayName: "ساعت", sortingAlgorithm: mySortingAlgorithm,
            width: '10%'
        }
    ],
    jqueryUITheme: true,
    enableSorting: false
};

var mySortingAlgorithm = function (a, b) {
    if (a == b) return 0;
    if (b < a) return 1;
    return -1;
};

这是我的css:

.gridStyle {
    border: 1px solid rgb(212, 212, 212);
    width: 800px;
    height: 630px;
    margin: 0 auto;
    direction: rtl;
    font-family:Arial;
}

IE控制台中的错误是:

HTML1300: Navigation occurred.
File: Profile
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
File: Profile
SyntaxError
   {
      [functions]: ,
      __proto__: { },
      ABORT_ERR: 20,
      code: 12,
      constructor: { },
      DATA_CLONE_ERR: 25,
      DOMSTRING_SIZE_ERR: 2,
      HIERARCHY_REQUEST_ERR: 3,
      INDEX_SIZE_ERR: 1,
      INUSE_ATTRIBUTE_ERR: 10,
      INVALID_ACCESS_ERR: 15,
      INVALID_CHARACTER_ERR: 5,
      INVALID_MODIFICATION_ERR: 13,
      INVALID_NODE_TYPE_ERR: 24,
      INVALID_STATE_ERR: 11,
      message: "SyntaxError",
      name: "SyntaxError",
      NAMESPACE_ERR: 14,
      NETWORK_ERR: 19,
      NO_DATA_ALLOWED_ERR: 6,
      NO_MODIFICATION_ALLOWED_ERR: 7,
      NOT_FOUND_ERR: 8,
      NOT_SUPPORTED_ERR: 9,
      PARSE_ERR: 81,
      QUOTA_EXCEEDED_ERR: 22,
      SECURITY_ERR: 18,
      SERIALIZE_ERR: 82,
      SYNTAX_ERR: 12,
      TIMEOUT_ERR: 23,
      TYPE_MISMATCH_ERR: 17,
      URL_MISMATCH_ERR: 21,
      VALIDATION_ERR: 16,
      WRONG_DOCUMENT_ERR: 4
   }

正如它所说的那样是因为Cache-Controlno-cache但我在设置response.addHeader("Cache-Control", "max-age=300");之后我从未在我的服务器端设置它(我正在使用servlet),但错误并没有消失

我只是想在IE 11及更高版本中使用它,我不介意它是否在早期版本的IE中不起作用。

0 个答案:

没有答案