Greetings! I have created a Single Page Application using AngularJS. Within my application, I am utilizing manual bootstrapping:
<script type="text/javascript">
angular.element(document).ready(function () {
var idsid;
jQuery.ajax({
type: 'GET',
url: 'http://myServer/MyApp/getUser.aspx',
async: false,
jsonpCallback: 'getUserIdentity',
contentType: "application/json",
dataType: "jsonp",
error: function (xhr, status, error) {
//alert("error"+status + " error value: "+error);//todo - remove alert, write to log
},
success: function (response) {
// do something with response
angular.bootstrap(document, ["MyApp"]);
}
});
});</script>
This particular code functions smoothly on Chrome, Firefox, and even IE11. However, upon attempting to run it in IE10, an error arises: SCRIPT1010: Expected identifier 08dcf8d5.scripts.js, line 4 character 1272 SCRIPT5022: [$injector:modulerr] Failed to instantiate module MyApp due to: [$injector:nomod] Module 'MyApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.2.15/$injector/nomod?p0=MyApp
http://errors.angularjs.org/1.2.15/$injector/modulerr?p0=MyApp&p1=%5B%24injector%3Anomod%5D%20Module%20'MyApp'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.2.15%2F%24injector%2Fnomod%3Fp0%MyApp
angular.js, line 3745 character 9
I rely on grunt to prepare my code prior to publishing it onto production (IIS Server), and what perplexes me is that when testing my app with a local server ('grunt serve'), IE 10 opens it without any trouble.
It seems that there is something within the "grunt build" operation that obstructs IE10 from running the application. Remember, my application functions seamlessly in Chrome, Firefox, and IE11 (both locally and on server versions).
Could anyone offer insights? Thank you!