angular-ui-route with IE8 - angularjs

I'm trying to use angular-ui-router in my current project - and it was all fine in chrome & firefox. But when it comes to trying it out in IE8, it doesnt seem to work. I'm getting the error 'TypeError: Object doesn't support this property or methodundefined'.
I initially thought that I must have done something wrong, so I tried the sample app that is linked from the angular-ui-router page: http://angular-ui.github.io/ui-router/sample/. But this sample app doesnt seem to work either (with the same error message).
So my question is... is IE8 supported? Or do I have to use angular-router? I would really love to use ui-router (for nested partials, multiple partials per page .. ) :(
Thanks!
Regards,
Alex

Ok. Angular-ui-router doesnt seem to be supported on IE8 by default, as there's a lot of Javascript incompatibility. After including es5-shim, it all works fine.

Related

Getting error "Object doesn't support property or method 'module' " when using angular.module ()

Where ever i am making use of angular.module() in my code, that part fails when i access through the IE browser. In chrome everything works fine.
Also the application where my code is present downgrades the IE version to 7 and renders the code.
I need to make angular.module() work in IE 7 .
below is the error :
SCRIPT438: Object doesn't support property or method 'module'
angular Js version i am using is 1.5.5
Also noticed a strange thing, on the first go, i get this error, but if i do a ctrl + f5 then the error goes away and app works fine
Angular doesn't support IE 8, let alone IE 7:
Note: AngularJS 1.3 has dropped support for IE8. Read more about it on
our blog. AngularJS 1.2 will continue to support IE8, but the core
team does not plan to spend time addressing issues specific to IE8 or
earlier.

Angular app Won't load on IE8

I'm developing an app with angular.
There is no much Javascript code, since it only make up.
It work fine in chrome/firefox/safari/ie9+
In IE8 it won't load the page, it throws several angular exceptions before the page loads.
I have read this post and tried, the errors are less, but there are some yet.
Angular does not have I8 support anymore? Is there anyway to fix that?
angular 1.3+ does not support ie8 anymore. If you want to use it on IE8, use angular 1.2 and below

How can I tell whether a web app was built using Angular (or other technologies)?

How can I tell whether a (Drupal 7) web app was built using Angular by looking at the page source, and not having to ask the developers?
The best way to check is to write "angular" on browser console. If you get any object [With child objects as "bind","bootstrap","callbacks","module" etc.] then its an angular web app.
You can install a chrome or firefox extension called Wappalyzer. It tells you which site you are navigated on in your browser and the stack they use.
Find it here: https://www.wappalyzer.com
You could try: angular.version.full first. If this doesn't work, try getAllAngularRootElements()[0].attributes["ng-version"]. The reason being in Angular 1 the former will work and from angular 2 onwards the later will work.
If it's an online site you can use http://builtwith.com/ and it usually can give you a good and useful bunch of information about that site.
However if they are using angular you can take a look at their page sources to see if they are using any attributes of angular like ng-repeat for example
You can also take a look at the sources that your browser get while browsing that site to see if javascript files for angularjs are included among the sources.
Application declared using ng-app directive
very simple controller and directive
check for ng-model, ng-repeater attributes in the code. All these attibutes are written in small letters.
Also you can check by typing in the console(ctrl + shift + i) and navigate to console tab. There type in window.angular.version --> it displays the version of the site your are currently inspecting.
Try
https://builtwith.com/
This is the website that currently gives you the most detailed information about what technologies a site uses. They will let you do 5 free lookups a day.
https://wappalyzer.com/
is a good one too, and serve as a complement to builtwith. I don't think there is a limit of lookups, but the results are less detailed.
Those two used together may give you more insight.
use window.getAllAngularRootElements() in the browser console if it return some value its an angular application
For Angular, in Chrome's inspector, in the Elements tab, inside the body element is an element called app-root containing ng-version, which shows the Angular version it's using.
There is a Google Chrome extension called 'ng-detector'. It may be obtained from the Google webstore:
https://chrome.google.com/webstore/detail/ng-detector/fedicaemhcfcmelihceehhaodggfeffm
It creates a small icon next to the URL bar that indicates whether or not it thinks the page was created using Angular, although I have not thoroughly tested its validity.
Install chrome extension React-Detector, it works!
window.getAllAngularRootElements() worked for me
You can install a Chrome or Firefox extension called Augury. It tells you if app is an angular or not.

How to debug angular when there is no exception in console

I am learning angular and wanted to use some modules. I have used a angular module and made it to work on a html page by itself. But When I merged this module into my main html it stopped working. Say for example ng-click is not working. Since this is a third party module and since it did not throw any exception in the console of chrome developer tools I cannot figure out what is the exception or what is causing it not to work
Please advise..
I know this question is generic but if in such scenarios what is the best way to solve the problem
Thanks

AngularJS Internet Explorer 9

I have small trouble with angularjs and internet explorer9. It look like, that angularjs is not loading correctly. If I starting ie with my application, nothing will work, but if I start the development tools of ie9 and refresh the page, my application will work and everything is loading and ready to use.
I have no idea, what happen and how to solve this issue. I using angularJs Version 1.1.5. Big thanks!
Update & Resolved
My problem was, that I had everywhere console.log (..). On FF or Chrome, everything works, but with II9, something happens, that ie stop after the statement console.log(...); After removing console.log(..) from my JavaScript, my application also works on IE7/8/9.
But ??
But I would ask why IE has so much problems with console.log?
I run in to the same issue and what fixed it was creating window console in the parent controller before using it. You can add the following code and try.
window.console = window.console || {};
window.console.log = window.console.log || function() {};
Use $log service. It will be injected in your controllers.
https://docs.angularjs.org/api/ng/service/$log
Are you making a call to console.log in your code?
If yes, this will not be available in IE unless you open the dev tools.

Resources