I would like to know whether there is a way I can restrict the user to open my Angular 4 app on IE (any version).
Any help is appreciated.
I would like to know whether there is a way I can restrict the user to open my Angular 4 app on IE (any version).
Any help is appreciated.
@Sunit be warned, I am new at this.
There are definite pitfalls with doing browser detection that requires wide nets to allow for browser versioning and platforms. With that said, if you are determined to continue, there is a really good answer from @RodW on options and pitfalls of browser detection here:
How to detect Safari, Chrome, IE, Firefox and Opera browser?
Using Rob's approach in your bootstrap component, determine browser and your load decision. Once you have determined whether to load or not, you have many options like template alternatives, apply route gaurds, etc. I reco going with a simple template approach where you provide user feedback.
<ng-container *ngIf="blockAccess">
<h1>The current browser cannot run this app.
<p>Please consider one of the approved.....</p>
<ng-container>
<ng-container *ngIf="!blockAccess">
<router-outlet></router-outlet>
<ng-container>
Outside of this, I found this really interesting and I think it is the way to go. Feature detection to determine if your apps can run. The moz spec it pretty detailed and helpful: