Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Angular doesn’t work in IE 7 with v1.2.0rc1 at all #3633

Closed
justinrknowles opened this issue Aug 16, 2013 · 7 comments
Closed

Angular doesn’t work in IE 7 with v1.2.0rc1 at all #3633

justinrknowles opened this issue Aug 16, 2013 · 7 comments

Comments

@justinrknowles
Copy link
Contributor

Works with versions 1.0.7 and 1.1.5

http://plnkr.co/edit/Ez7zyje7Rn4p4fI3TmVs (plunker doesn't work in IE 7 so you will have to serve locally)

The follow error is displayed in the developer tools script console:
[$sce:iequirks] Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.

I'm using IE 8 in IE 7 Standards Mode.

@GabrielDelepine
Copy link

Is it the same issue after adding the meta below ? (this meta prohibit IE to use the quirks mode)

<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge" /><![endif]-->

@justinrknowles
Copy link
Contributor Author

What I have found is that the IE specific property 'documentMode' is being used to test for quirks mode. This property was introduced in IE 8 and returns one of the following values:
• 5 - quirks mode
• 7 - IE 7 standards mode
• 8 - IE 8 standards mode

Currently the test is documentMode < 8 but I propose it should be documentMode < 7. This should allow IE 8 in IE 7 standards mode to work and still protect against quirks mode.

@patorjk
Copy link

patorjk commented Aug 20, 2013

I made the changes for documentMode, but now I get this error when using IE7:

[object Error]undefined

And nothing seems to load. Everything worked fine in the previous version I was using (1.1.4)

@justinrknowles
Copy link
Contributor Author

With this documentMode patch I am able to get the basic Angular app such as this http://plnkr.co/edit/Ez7zyje7Rn4p4fI3TmVs working in: IE6, IE7, and IE8 running in IE7 standards mode. The app fails when IE8 is running in quarks mode as expected. I would need more details to determine what the root cause of this issue you are experiencing is.

@patorjk
Copy link

patorjk commented Aug 21, 2013

@justinrknowles Here's the issue I'm running into: http://patorjk.com/tests/angular-1.2.0rc1-test.htm (I'd use plnkr, but it's not working in IE for me for some strange reason)

If I open that in IE in "Browser Mode: IE7" and "Document Mode: IE7 Standards", I get an error that says:

SCRIPT5022: [$sce:iequirks] Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.
angular.js, line 10875 character 9

If I go in and change the check on that line, I get an error about "[object Error]undefined".

@chirayuk
Copy link
Contributor

@justinrknowles – are you unable to use IE8 in standards mode?

chirayuk added a commit to chirayuk/angular.js that referenced this issue Aug 23, 2013
This reverts commit 637c9b1.
(ref angular#3633 and angular#3646)

The minimum bar for $sce is IE8 in standards mode.  IE7 standards mode
is not supported.  If you must support IE7, you should disable $sce
completely.

  angular.module('ie7support', []).config(function($sceProvider) {
    // Completely disable SCE to support IE7.
    $sceProvider.enabled(false);
  });
chirayuk added a commit that referenced this issue Aug 23, 2013
This reverts commit 637c9b1.
(ref #3633 and #3646)

The minimum bar for $sce is IE8 in standards mode.  IE7 standards mode
is not supported.  If you must support IE7, you should disable $sce
completely.

  angular.module('ie7support', []).config(function($sceProvider) {
    // Completely disable SCE to support IE7.
    $sceProvider.enabled(false);
  });
@chirayuk
Copy link
Contributor

See #3646

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

Successfully merging a pull request may close this issue.

4 participants