10

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) at Anonymous function (angular.js:7079:34)enter code here at nodeLinkFn (angular.js:6677:13) at compositeLinkFn (angular.js:6071:13) at publicLinkFn (angular.js:5967:30) at link (angular-route.js:919:7) at boundTranscludeFn (angular.js:6091:9)

Please help me some solution, thanks.

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Le Toan
  • 231
  • 1
  • 3
  • 7
  • Can you use the non-minified version of your code and post the relevant part in your code it is complaining about? – GregL Dec 08 '14 at 05:07
  • Hi @Le Toan, Your question is too vague to understand where is the exact problem. Can you please provide more details like code snapshot, what is not working etc. I do use AngularJS in IE11 and it works well. Hence it won't be appropriate to say AngularJS not working in IE11. Please provide complete details about your problem. – CuriousMind Dec 08 '14 at 05:10

2 Answers2

14

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" />
Shyam_coder
  • 869
  • 10
  • 5
  • 1
    For future searchers - this solution combined with moving the script for the app.js to the bottom i.e. should be the last script (apologies I can't find the place on SO where someone pointed this out. The 2 actions combined solved a 'nightmare' issue for me! – gringogordo Apr 28 '17 at 14:57
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 webAddressControllerfunction 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));​
Community
  • 1
  • 1
Meligy
  • 35,654
  • 11
  • 85
  • 109