angular.js icon indicating copy to clipboard operation
angular.js copied to clipboard

AngularJs (all versions) breaks on IE11 in document mode ie=8

Open derbernd86 opened this issue 13 years ago • 24 comments

Hello, due to restrictions with legacy applications, my angularjs app is loaded in an iframe. The surrounding website has the document mode ie=8. <meta http-equiv="X-UA-Compatible" content="IE=8" />

So every website that is loaded within the iframe is also rendered in the ie8 documentmode.

Unfortunately Angular Js doesn't work in Internet Explorer 11 with the document mode ie=8 as described above.

I made a very simple example (see below) where this problem also occurs. It's based on an example of angularjs.org.

If you change the document mode e. g. to <meta http-equiv="X-UA-Compatible" content="IE=9" /> the example works.

This problem seams to appear in all angularjs versions. I tried 1.0.3, 1.0.8, 1.1.5 and 1.2.0-rc.2.

I hope you can help me.

Best regards Bernd Hartmann

Sorry for the code here, but I didn't get the document mode run in an jsfiddle or Plunker.

1.) ie11testappframe.html

<!doctype html>
<html>
<head>
<title>AngularJs IE11 Test App Host</title>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<style type="text/css">
iframe{
width: 100%;
height: 500px;
}
</style>
</head>
<body>
<h1>AngularJs IE11 Test App Host</h1>
<p>below you see the iframe, where an angular js app is loaded</p>
<iframe src="ie11testapp.html">

</iframe>

</body>
</html>

2.) ie11testapp.html

<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
</head>
<body>
<div><label>Name:</label> <input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1></div>
</body>
</html>

derbernd86 avatar Sep 24 '13 13:09 derbernd86

Hi, you should put the meta tag in the main html file inside the head tag

parak80 avatar Jul 05 '18 11:07 parak80

I am using angular cli/angular 5 in my app and it run in IE browser but there are some css/bootstrap that are not following with, like my navbar, some colors that described as default color for buttons: var(); etc. They are not showing. Anyone has solution for this?

parak80 avatar Jul 05 '18 12:07 parak80

Hi, I am facing this problem in IE11, I tried to set below the head, but the issue still exist som fiel are disabled on IE11 from the other side everything working correctly on edge. Any idea how can I deal with this?

Oscar8401 avatar Nov 15 '18 12:11 Oscar8401

The only fix that I found is to update tsconfig.json file. Change to "target": "es3" from whatever you have in your tsconfig.json.

sdokic avatar Jun 03 '19 17:06 sdokic