0

I'm the responsible of make some news features and the maintenance of an Angular application (version 8.3.4). The first idea was that the application should work in all IE versions, but that is nonsense.

When I enter the application via Internet Explorer 11 it works, but it doesn't work for versions lower or equal than 9, then a white screen is displayed. I changed the target to be es5 (Typescript- What is target in tsconfig?) but I cannot make compatible with older IE versions.

Is there a way to show an unsupported IE version message in the browser instead to show a white screen? Because some users, that use old machines, thinks that the application is break.

The client said to me that the minimum IE version that should show the message is IE7.

Albert Lazaro de Lara
  • 2,540
  • 6
  • 26
  • 41

1 Answers1

2

There is a feature known as conditional comments. It is designed to be recognizable by IE browsers exclusively and take no effect on non-IE browsers.

The syntax looks like this

<!--[if gt IE 9 ]>
  <p>Only less than IE 9 will see this</p>
<![endif]-->

Please notice, that it works only for IE <= 9 versions.

Source

nakhodkin
  • 1,327
  • 1
  • 17
  • 27
  • I think this is the best approach. I don't think there is something specific in Angular to show a message when the app cannot be used on a specific IE. – Albert Lazaro de Lara Apr 07 '20 at 10:48
  • I am not sure whether conditional comments will work when app shows the blank page. I suggest you recommend your clients to upgrade to IE 11 browser at least. As older versions of the IE browser are now out of support scope of Microsoft and there can be security-related issues. – Deepak-MSFT Apr 07 '20 at 11:05