Le *_*oan 10 javascript angularjs internet-explorer-11 ie11-developer-tools
我有问题,工作angular js中ie 11
类型错误:分配到只读属性不严格模式在链路(允许ves-min.js:490:7在)Anonymous function(::7079 34 angular.js)enter code here在nodeLinkFn (angular.js:6677:13)在compositeLinkFn (angular.js:6071:13)在publicLinkFn (angular.js:5967:30)在链接(angular-route.js:919:7)在boundTranscludeFn (angular.js:6091:9)
请帮我解决一下,谢谢.
小智 14
在头标记中添加此行并进行刷新,当它要求"允许块内容"时单击"是".
<meta http-equiv="X-UA-Compatible" content="IE=11" />
Run Code Online (Sandbox Code Playgroud)
Mel*_*igy 11
可能是以下问题:
也许只是IE 11尊重严格模式,这意味着如果您执行以下操作:
(function () {
"use strict";
function webAddressController($scope, $rootScope, web_address_service) {
// Do things
}
}());
Run Code Online (Sandbox Code Playgroud)
该webAddressController函数不在全局范围内供Angular选择(使用自执行语法的目的是避免向全局范围添加内容).
所以,你可能想尝试类似的东西:
(function (angular) {
"use strict";
angular.module('myApp').controller('webAddressController', function($scope) {
// Do things
});
}(window.angular));?
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
33460 次 |
| 最近记录: |