1

I am getting an error saying the page targets document 5 mode and some features are unavailable when running a Angular2 application. What all shims are needed for IE and Edge for Angular2? I am on IE 11 and also the same page as well does not work with Edge.

enter image description here

Gary
  • 2,293
  • 2
  • 25
  • 47

1 Answers1

2

This may not have anything to do with Shims or Angular2. If your page is rendering in Document 5 mode in IE/Edge, there is a possibility that the page is not defining the doctype properly.

To resolve, ensure that you have the following doctype directive:

<!DOCTYPE html>

Then check your document mode from your browser:

enter image description here

For more information:

https://msdn.microsoft.com/en-us/hh779632.aspx

Michael Kang
  • 52,003
  • 16
  • 103
  • 135
  • Ok near. The document mode for IE11 is only when my dev tools are open. When it closes it goes back to IE7. I have IE 11 installed. I have specified the doctype as well but in IE7 it does not seem to work either and angular2 might not work in IE7 as much as I am aware. My question is where do I change the default app mode to IE11 even when the devtools are closed. In IE11 mode I can work with the app. – Gary Jul 30 '16 at 15:09
  • 1
    Try adding a meta tag: . For more information, this might help you: http://stackoverflow.com/questions/13284083/ie10-renders-in-ie7-mode-how-to-force-standards-mode – Michael Kang Jul 30 '16 at 20:23
  • Ok worked. But it does not work in Edge.It gives a we cant reach this page error in Edge. Seems its not detecting Apache HTTPD Virtual Host. I have Host file already modified and IE works. – Gary Jul 31 '16 at 00:52