我正在使用RequireJS将几个(xdomain)文件从domainB加载到domainA,包括AngularJS框架,如下所示:
var basePath = DOMAIN_B;
require.config({
baseUrl: basePath+"js/scripts/",
paths: {
'angular': '../lib/angular/angular',
'angular-route': '../lib/angular/angular-route',
'angularAMD': '../lib/requirejs/angular-amd',
'ControllerVideos': 'controller/controller-videos',
'ControllerFriendProfile': 'controller/controller-friend-profile',
'ControllerAchieve': 'controller/controller-achieve',
'ControllerDiary': 'controller/controller-diary',
'ControllerFriends': 'controller/controller-friends',
'ControllerProfile': 'controller/controller-profile',
'ControllerLanding': 'controller/controller-landing',
'ControllerMain': 'controller/controller-main'
},
// Add angular modules that does not support AMD out of the box, put it in a shim
shim: {
'angularAMD': ['angular'],
'angular-route': ['angular']
},
// kick start application
deps: ['app']
});
行deps:['app']
在IE9中抛出了“拒绝访问”错误。这在IE10,Chrome或FireFox中不会发生。
有谁知道这是为什么?