Skip to content

v0.2.0 & IE8 #390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ocombe opened this issue Sep 6, 2013 · 9 comments
Closed

v0.2.0 & IE8 #390

ocombe opened this issue Sep 6, 2013 · 9 comments

Comments

@ocombe
Copy link
Contributor

ocombe commented Sep 6, 2013

I recently updated from v0.0.1 to v0.2.0 and I just had to change "ui.state" to "ui.router" and everything seemed to be working fine, until I tried IE8 and got this nice error:
"TypeError: Object does not support property or "forEach" method undefined"

Sorry,but the IE8 debugger sucks and I don't have the line for the error...
I did a bit of digging and the error seems to be in this block of code:

// Resolve template and dependencies for all views.
      forEach(state.views, function (view, name) {
        var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {});
        injectables.$template = [ function () {
          return $view.load(name, { view: view, locals: locals, params: $stateParams, notify: false }) || '';
        }];

        promises.push($resolve.resolve(injectables, locals, dst.resolve, state).then(function (result) {
          // References to the controller (only instantiated at link time)
          result.$$controller = view.controller;
          // Provide access to the state itself for internal use
          result.$$state = state;
          dst[name] = result;
        }));
      });

In the file state.js line ~363 : https://github.com/angular-ui/ui-router/blob/master/src/state.js

I can get a console.log just before promises.push but nothing after.

@trask
Copy link
Contributor

trask commented Sep 7, 2013

I just ran into the same issue. You can use es5-shim to workaround. I submitted a PR to not require es5-shim. See #392.

@ocombe
Copy link
Contributor Author

ocombe commented Sep 7, 2013

good catch, this should help solving this bug

@cateland
Copy link

cateland commented Sep 9, 2013

Angular UI team stated they won't activelly support IE8/7

@nateabele
Copy link
Contributor

I just merged the PR from @trask. Please update & try again.

@laurelnaiad
Copy link

When I search the code for IE8, I see this:

// Used instead of Object.keys() for IE8 compatibility

And I see @nateabele merging a fix for IE8 expeditiously.

What I don't see is the Angular-UI team stating they won't actively support IE8/7.

Angular UI team stated they won't activelly support IE8/7

@cateland, are you referring to the Angular-UI team at large? I'm hoping so. What the widgets need is a bit different than what the router needs and I'm sure trying to support IE8 at that level would be a terrible experience.

Unfortunately I have a vested interest the router continuing to work with IE8 and I hope that it will!

@cateland
Copy link

cateland commented Sep 9, 2013

@stu-salsbury yes i was refering to the Angular-UI team at large.
But they don't prevent contributor to submit patch targeted at IE7/8.
Im also deeply interested into having ui-router to work on those plateforms.

@nateabele
Copy link
Contributor

I don't really make a habit of testing on IE, but we accept bug reports for any browser supported by Angular itself.

@ocombe Please verify that the PR resolves your issue and if so, do us a favor and close this issue. Thanks.

@ocombe
Copy link
Contributor Author

ocombe commented Sep 9, 2013

I confirm that it is fixed by d2ced6b
Thanks for the reactivity !

@ocombe ocombe closed this as completed Sep 9, 2013
@laurelnaiad
Copy link

@nateabele I don't blame you. I just set up a virtualbox to test IE8 only to find that it didn't even support chai's expect syntax (never mind should)! Array slice doesn't even work right without a shim. It's ugly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants