Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/410.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Angular JS在IE 8中不渲染视图_Javascript_Angularjs_Internet Explorer_Internet Explorer 8 - Fatal编程技术网

Javascript Angular JS在IE 8中不渲染视图

Javascript Angular JS在IE 8中不渲染视图,javascript,angularjs,internet-explorer,internet-explorer-8,Javascript,Angularjs,Internet Explorer,Internet Explorer 8,Internet explorer 8似乎讨厌联系人表单中使用的Angular.js,我不知道如何调试。在IE 11中使用仿真模式表明视图没有呈现,但控制台似乎没有报告任何错误。是否有明显的问题我忽略了,或者是否有更好的解决问题的方法 以下是(相关)呈现的HTML: <!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en" dir="ltr"> &l

Internet explorer 8似乎讨厌联系人表单中使用的Angular.js,我不知道如何调试。在IE 11中使用仿真模式表明视图没有呈现,但控制台似乎没有报告任何错误。是否有明显的问题我忽略了,或者是否有更好的解决问题的方法

以下是(相关)呈现的HTML:

<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en" dir="ltr"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en" dir="ltr"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en" dir="ltr"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr" ng-app="contactApp">
<!--<![endif]-->

<head>
    <title>Contact</title>

    <!-- Meta Data ================ -->
    <meta charset="UTF-8" />
    <meta name="description" content="Fill this in with your information" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />

    <link href="/bundles/themes/crisp/css?v=pK1cGyJZf_vIrdHwRAD8udDrwCLW4VlqszdBq6edIec1" rel="stylesheet"/>

    <script src="/bundles/jquery?v=aLsVjoQ4OTEtRxZ322JRn0RdnugNXJ-_IdXTAvkYpyU1"></script>

    <link href="/bundles/less?v=PejI2ZnuZepYh90ntnI8FhCApgGHAiohpYRpz8gcRRg1" rel="stylesheet"/>

    <script src="/bundles/modernizr?v=wBEWDufH_8Md-Pbioxomt90vm6tJN2Pyy9u9zHtWsPo1"></script>


    <!-- Icons ================ -->
    <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
    <link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png" />
    <!-- For first- and second-generation iPad: -->
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png" />
    <!-- For iPhone with high-resolution Retina display: -->
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png" />
    <!-- For third-generation iPad with high-resolution Retina display: -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144x144-precomposed.png" />
    <link rel="shortcut icon" href="favicon.ico" />

    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,400italic,300italic,700,700italic" rel="stylesheet">
    <link href="http://fonts.googleapis.com/css?family=Raleway:300,500,600,700" rel="stylesheet">
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
</head>
<body class="index">    
<div class="container clearfix" id="main-content" ng-controller="ContactController">
    <div class="animated bounceInLeft" ng-view></div>
</div>


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<script type="text/javascript" src="http://code.angularjs.org/1.2.14/angular-route.js"></script>
<script type="text/javascript" src="/Content/JS/Controllers/ContactController.js"></script>
<script>
    var contactApp = angular.module("contactApp", ['ngRoute']);
    contactApp.controller('ContactController', ContactController);
    contactApp.config(function ($routeProvider) {
        $routeProvider
            .when('/',
                {
                    controller: 'ContactController',
                    templateUrl: '/Content/JS/Views/Forms/MessageForm.html'
                })
            .when('/refer/',
                {
                    controller: 'ContactController',
                    templateUrl: '/Content/JS/Views/Forms/ReferForm.html'
                })
            .otherwise({ redirectTo: '/' });
    });
</script>
</body>
</html>
基于,我将尝试将id=“ng app”添加到根元素:

<html class="no-js" lang="en" dir="ltr" ng-app="contactApp" id="ng-app">

基于快速代码审查;我认为这是您唯一缺少的项目。

添加这一行

<html xmlns:ng="http://angularjs.org">


你能不能把控制台的错误

接得好!但似乎还是不想工作。。。我正在翻阅你链接到我的文档。我希望文档能有所帮助。祝你好运它今天起作用了——我猜昨天缓存了一些东西。谢谢你的帮助!我的部分问题是IE11(模拟IE8)没有抛出任何控制台错误。有没有关于如何找到错误的想法?当我今天再次访问时,它起了作用。我想昨天可能有东西被缓存了。不过我还是添加了这个-我现在知道它在文档中的引用位置了。
<html xmlns:ng="http://angularjs.org">