Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular JS "SCRIPT5007: Object expected" error in IE9 and IE10 upon loading the angular library

I am developing an AngularJS application that should run on Firefox and IE 9 and IE 10. I use the latest version of angularjs library (now it is 1.3.15). The serverside is written in Java in JavaEE platform and server runs on GlassFish, and our computers run windows 7.

Everything works fine when I am running the server locally on my computer and access my application using the http://localhost:8080 url.

But in IE9 and IE10, when I try to load the application from my server by using my ip address (something like http://191.10.10.200:8080) then angularJS library fails to load. It gives an error saying:

SCRIPT5007: Object expected angular.min.js, line 7 character 218

Can this be an issue with the security settings of IE? Or the network? I looked for similar issues but none was talking about this problem. Please help me if have an idea how can this be resolved.

like image 482
Joubin Z. Avatar asked Apr 20 '15 13:04

Joubin Z.


1 Answers

I had the same error which only occurred in IE9 and IE10 when I was loading a page requiring AngularJS.

My page was simply missing the DOCTYPE header from the top of the page:

<!DOCTYPE html>

Once I added it AngularJS loaded just fine for me.

like image 64
Jeff Yates Avatar answered Nov 14 '22 09:11

Jeff Yates