Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/433.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 角度手动引导在IE 10上不起作用_Javascript_Angularjs_Gruntjs_Internet Explorer 10_Bootstrapping - Fatal编程技术网

Javascript 角度手动引导在IE 10上不起作用

Javascript 角度手动引导在IE 10上不起作用,javascript,angularjs,gruntjs,internet-explorer-10,bootstrapping,Javascript,Angularjs,Gruntjs,Internet Explorer 10,Bootstrapping,Hi使用AngularJS开发SPA。 在我的应用程序中,我使用手动引导: <script type="text/javascript"> angular.element(document).ready(function () { var idsid; jQuery.ajax({ type: 'GET', url: 'http://myServer/MyApp/getUse

Hi使用AngularJS开发SPA。 在我的应用程序中,我使用手动引导:

<script type="text/javascript">
angular.element(document).ready(function () {
            var idsid;
            jQuery.ajax({
                type: 'GET',
                url: 'http://myServer/MyApp/getUser.aspx',
                async: false,
                jsonpCallback: 'getUserIdentity',
                contentType: "application/json",
                dataType: "jsonp",
                error: function (xhr, status, error) {
                    //alert("error"+status + " error value: "+error);//todo - remove alert, write to log
                },
                success: function (response) {
//                   do something with response
                    angular.bootstrap(document, ["MyApp"]);
                }
            });
        });</script>

angular.element(文档).ready(函数(){
var-idsid;
jQuery.ajax({
键入:“GET”,
网址:'http://myServer/MyApp/getUser.aspx',
async:false,
jsonpCallback:'getUserIdentity',
contentType:“应用程序/json”,
数据类型:“jsonp”,
错误:函数(xhr、状态、错误){
//警报(“错误”+状态+”错误值:“+错误);//todo-删除警报,写入日志
},
成功:功能(响应){
//做些有反应的事情
引导(文档,[“MyApp”]);
}
});
});
这段代码在Chrome、Firefox甚至IE11上都非常有效。 当我尝试使用IE10运行它时,我遇到了下一个错误: SCRIPT1010:预期的标识符 08dcf8d5.scripts.js,第4行字符1272 SCRIPT5022:[$injector:modulerr]未能实例化模块MyApp,原因是: [$injector:nomod]模块“MyApp”不可用!您要么拼错了模块名,要么忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数

http://errors.angularjs.org/1.2.15/$injector/nomod?p0=MyApp
http://errors.angularjs.org/1.2.15/$injector/modulerr?p0=MyApp&p1=%5B%24 injector%3名称%5D%20模块%20'MyApp%20不可用!%20您%20已拼写%20模块%20名称%20或%20忘记%20以%20加载%20它。%20如果%20注册%20a%20模块%20请确保%20您%20将%20依赖项%20指定为%20秒%20参数。%0Ahttp%3A%2F%2F错误。angularjs.org%2F1.2.15%2F%24injector%2Fnomod%3Fp0%MyApp
angular.js,第3745行,字符9

我使用grunt在将代码发布到产品(IIS服务器)之前准备代码,奇怪的是,当我尝试使用本地服务器(“grunt服务”)运行我的应用程序时,IE 10会毫无问题地打开它

我假设在“grunt构建”操作中有什么东西阻止IE10使用该应用程序。 提醒一下——在Chrome、Firefox和IE11中,我的应用程序运行良好(在本地和服务器版本上)

有什么想法吗?
谢谢使用以下参数:

cache: false,
crossDomain: false
参考资料