0

I got the most odd problem I've ever encounted.

I've made a proof of concept app at my company. So it has no backend, just a demo frontend built in Angular JS. I've schaffolded the project with yeoman and built it with grunt. Locally it works perfectly.

I have deployed it at a internal server at my company. It also works there in every browser except IE9.

In console I get

SCRIPT438: Egenskapen eller metoden addEventListener stöds inte av objektet 
jquery.min.js, rad 4 tecken 6105

SCRIPT5009: jQuery har inte definierats 
jquery-ui.min.js, rad 5 tecken 1

SCRIPT5009: jQuery har inte definierats 
1bd2ba7a.scripts.js, rad 1 tecken 28462

SCRIPT445: Objektet kan inte hantera denna åtgärd. 
angular.min.js, rad 23 tecken 453

It's in swedish but I hope you understand anyway.

Now to the even wierder part. I tried deploy it on a external server. And it works in IE9!

As I said, I have no server code so there isn't any install I'm missing. Also, I don't have any CDN:s. Everything is local.

Anyone have any idea how to debug this? I'm stuck.

Joe
  • 4,274
  • 32
  • 95
  • 175

2 Answers2

0

Problem solved. The issue was that IE was set to run intranet pages in compatibility mode. It's an option found in tools -> compatibility mode. This option was activated centrally by our IT department. Reason was that older internal apps needed this to work. So the solution in this case was to depoly the app on an external server.

Joe
  • 4,274
  • 32
  • 95
  • 175
0

I ran into the same issue you did, though with a Yeoman scaffolded Angularjs project. Turns out the US Federal Gov't also sets IE compatibility mode for all internal sites. Under IE compatibility mode (IE9), the index.html page of the Angularjs app would not render.

After experimenting, I found that if you delete the following Yeoman-produced boilerplate, something interesting happens. IE shifts from compatibility mode to standards mode, and the app renders and runs fine. Here's the boilerplate to be deleted:

<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

In case anyone navigates to this page looking for a solution to Yeoman project related problems with IE compatibility mode, as I did, I thought I'd document my experience here in case it may help others.

Just found this alternative way to address the problem (IE8 issue) by wrapping the above if/endif with HTML5 if/endif: Override intranet compatibility mode IE8

Thanks for opening this issue.

Community
  • 1
  • 1
ElliotPsyIT
  • 322
  • 3
  • 7