javascript - 带有 angular-ui Bootstrap 的 AngularJS - 使其与 IE8 兼容

标签 javascript angularjs twitter-bootstrap

我正在尝试获取一些使用 angular-ui bootstrap 的 AngularJS 代码在 IE 8 中工作。我正在使用 AngularJS developer guide on IE 中的指南.我将以下代码添加到我的 index.html 页面:

<!doctype html>
<html xmlns:ng="http://angularjs.org" id="ng-app" ng-app="plunker">
<head>
    <!--[if lte IE 8]>
    <script src="//cdnjs.cloudflare.com/ajax/libs/json2/20130526/json2.js"></script>
    <script>
        document.createElement('alert');
        document.createElement('ng-include');
        document.createElement('bookviewer');
        document.createElement('accordion');
        document.createElement('accordion-group');
        document.createElement('accordion-heading');
    </script>
    <![endif]-->
    :

问题是:我无法让它工作...以上几行是完整代码集的一部分,该代码集太大而无法包含在此处。我在 https://github.com/svdoever/AngularJS-bookviewer 上将完整的代码添加到 github 存储库中。 . 是不是我忘记了什么,或者 AngularJS+angular-ui bootstrap+IE8 是永远行不通的组合?

我将示例的一个版本部署到 http://svdoever-playground.azurewebsites.net/ .

最佳答案

我通过添加 augment.js 解决了这个问题。 https://github.com/javascript/augment 问题是 bootstrap.js 使用的是 IE8 没有实现的 JS 函数。 Augment.js 正好填补了空白。

关于javascript - 带有 angular-ui Bootstrap 的 AngularJS - 使其与 IE8 兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21555553/

相关文章:

javascript - html td问题: hide a td value if another has a value 'not available'

javascript - 为什么我的 Angular 代码变成评论?

css - MVC5 - 导航栏事件颜色

JavaScript 不会将数据写入 Firebase 实时数据库

java - 如何在不使用鼠标的情况下为 Facebook 粉丝专页上的页面点赞

javascript - Eloquent javascript 表格绘制函数 - drawRow 参数

javascript - 如何使用 AngularJS 在我的选择标签中使用 onSelect 而不是 ng-change

javascript - 使用 Spring mvc 和 Angular JS 显示数据库中的图像列表

javascript - 创建响应 html 表时出现问题

jquery - Bootstrap 3 模态重定向页面打开