IE8 Compatability
I have been working busily on my app whilst learning Angular (quite a steep curve!). This generator has made it a lot easier to get my head round certain concepts and ways of doing things in Angular, so huge thanks for the work on this!
I need the app to work on IE8+ and I haven 't given it too much thought as I've seen in a few posts here discussing Angular JS 1.3 and that people were interested in maintaining IE8 compatability so I figured it should be OK.
Having tried to test my app on IE8, I came across a number of issues which I am stuck on fixing. I fixed the main ones in my app (using reserved keywords). I figured the rest of the bugs were things I had altered so I made sure the generator was uptodate (2.0.13) and did a completely clean install of the base code and tried to run that in IE8.
I'm getting the errors shown below on just the default generated code.and hoped someone might be able to shed some light?
In most of the cases, IE8 is having trouble with .catch (function ()... which causes it to return 'Expected indentifier'. Removing the .catch fixes this but obviously, that is not an ideal solution.
The final error with the injection is more puzzling for me - I've tried to do searches regarding this but have not had any luck.
IE9+, Firefox, Chrome, etc are all fine. Just good ol' IE8 is causing issues and displaying a completely blank page!
I have tested using browserstack and VirtualBox using an image from modern.ie (XP with IE8); both have the same problems. I have tested both against the minified and unminified code.
Any thoughts/help would be appreciated!
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) Timestamp: Mon, 19 Jan 2015 19:29:56 UTC
Message: Expected identifier Line: 20 Char: 10 Code: 0 URI: http://192.168.1.34:9000/app/account/login/login.controller.js
Message: Expected identifier Line: 14 Char: 10 Code: 0 URI: http://192.168.1.34:9000/app/account/settings/settings.controller.js
Message: Expected identifier Line: 21 Char: 10 Code: 0 URI: http://192.168.1.34:9000/app/account/signup/signup.controller.js
Message: Expected identifier Line: 9 Char: 12 Code: 0 URI: http://192.168.1.34:9000/app/admin/admin.controller.js
Message: Expected identifier Line: 20 Char: 13 Code: 0 URI: http://192.168.1.34:9000/app/main/main.controller.js
Message: Expected identifier Line: 120 Char: 14 Code: 0 URI: http://192.168.1.34:9000/components/auth/auth.service.js
Message: Expected identifier, string or number Line: 36 Char: 9 Code: 0 URI: http://192.168.1.34:9000/components/modal/modal.service.js
Message: [$injector:unpr] Unknown provider: AuthProvider <- Auth http://errors.angularjs.org/1.2.28/$injector/unpr?p0=AuthProvider%20%3C-%20Auth Line: 3935 Char: 19 Code: 0
URI: http://192.168.1.34:9000/bower_components/angular/angular.js
Just had a thought and tested the demo page with the same results (although the minified code produces a different injection error).
http://fullstack-demo.herokuapp.com/
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) Timestamp: Mon, 19 Jan 2015 20:19:27 UTC
Message: Expected identifier Line: 1 Char: 1450 Code: 0 URI: http://fullstack-demo.herokuapp.com/app/3d6667a6.app.js
Message: [$injector:modulerr] Failed to instantiate module demoApp due to: [$injector:nomod] Module 'demoApp' 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.23/$injector/nomod?p0=demoApp http://errors.angularjs.org/1.2.23/$injector/modulerr?p0=demoApp&p1=%5B%24injector%3Anomod%5D%20Module%20'demoApp'%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.23%2F%24injector%2Fnomod%3Fp0%3DdemoApp Line: 4 Char: 16412 Code: 0 URI: http://fullstack-demo.herokuapp.com/app/865366aa.vendor.js
Further information:
The injector error in the UNMINIFIED code (Unknown provider: AuthProvider <- Auth) seems to be related to the .catch(function() in the 'isLoggedInAsync'. Commenting this out allows the app to actually load and display, although the login doesn't seem to work and I can see my username and password in the browser address bar.
The injector error in the minified code is still a mystery. I read about the need to include ngRoute (even though I opted for ui-router) but this did not work.
I fixed this using some of the information in this issue...
https://github.com/DaftMonk/generator-angular-fullstack/issues/113
I have replaced all instances of .catch with ['catch'] and the app loads and works in IE8.
Now, I just have to work out why my directives are not displaying, why tables don't work, why ...... :/
Grrr!