简体   繁体   English

AngularJS with angular-ui bootstrap - 让IE8兼容

[英]AngularJS with angular-ui bootstrap - getting it IE8 compatible

I'm trying to get some AngularJS code that uses angular-ui bootstrap to work in IE 8. I am using the guidance in the AngularJS developer guide on IE . 我正在尝试使用angular-ui引导程序在IE 8中使用一些AngularJS代码。我正在使用IE上的AngularJS开发人员指南中的指南 I added the following code to my index.html page: 我将以下代码添加到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]-->
    :

Problem is: I can't get it to work... The above lines are part of a complete code set that is too large to include here. 问题是:我无法让它工作......上面的行是完整代码集的一部分,这个代码集太大而不能包含在这里。 I added the complete code to a github respository at https://github.com/svdoever/AngularJS-bookviewer . 我在https://github.com/svdoever/AngularJS-bookviewer上将完整的代码添加到github存储库中。 Is there something I forget, or is AngularJS+angular-ui bootstrap+IE8 a combination that will never work? 有没有我忘记的东西,或AngularJS + angular-ui bootstrap + IE8组合永远不会起作用?

I deployed a version of my example to http://svdoever-playground.azurewebsites.net/ . 我将我的示例版本部署到http://svdoever-playground.azurewebsites.net/

I fixed the issue by adding augment.js. 我通过添加augment.js修复了这个问题。 https://github.com/javascript/augment The issue was that bootstrap.js is using JS function that IE8 does not implement. https://github.com/javascript/augment问题是bootstrap.js正在使用IE8没有实现的JS功能。 Augment.js just fill the gap. Augment.js填补了空白。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM