I'm have problem with working angular js
in ie 11
TypeError: Assignment to read-only properties is not allowed in strict mode at link (
ves-min.js:490:7
) atAnonymous function
(angular.js:7079:34)enter code here
atnodeLinkFn (angular.js:6677:13)
atcompositeLinkFn (angular.js:6071:13
) atpublicLinkFn (angular.js:5967:30)
at link(angular-route.js:919:7)
atboundTranscludeFn (angular.js:6091:9)
Please help me some solution, thanks.
The JavaScript strict mode -only exception "is read-only" occurs when a global variable or object property that was assigned to is a read-only property. What went wrong? The global variable or object property that was assigned to is a read-only property.
In strict mode, any assignment to a non-writable property, a getter-only property, a non-existing property, a non-existing variable, or a non-existing object, will throw an error.
Compiling a numeric literal (4 + 5;) or a string literal ("John Doe";) in a JavaScript program has no side effects. It simply compiles to a non existing variable and dies. So "use strict"; only matters to new compilers that "understand" the meaning of it. Why Strict Mode? Strict mode makes it easier to write "secure" JavaScript.
This error happens only in strict mode code. In non-strict code, the assignment is silently ignored. Read-only properties are not super common, but they can be created using Object.defineProperty () or Object.freeze (). There are also a few read-only properties built into JavaScript.
Add this line in your head tag and do refresh, when It will ask for "allow block content" click "yes".
<meta http-equiv="X-UA-Compatible" content="IE=11" />
It could be the following problem:
AngularJS controllers and "use strict"
Maybe it's just that IE 11 respects strict mode, which means if you do something like:
(function () {
"use strict";
function webAddressController($scope, $rootScope, web_address_service) {
// Do things
}
}());
The webAddressController
function is not in global scope for Angular to pick (the point of using the self executing syntax is to avoid adding things to global scope).
So, you might want to try something like:
(function (angular) {
"use strict";
angular.module('myApp').controller('webAddressController', function($scope) {
// Do things
});
}(window.angular));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With