Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I check for browser support for AngularJS?

I have to check if the browser being used supports my site which uses AngularJS version 1.2.12. The goal is to show a message saying to 'update/change your browser' for old versions of Chrome/Safari/IE. Feature detection is recommended in general but for issues like this: https://github.com/angular/angular.js/issues/4749 where select elements don't refresh their values, as well as some other IE8 issues, feature detection doesn't seem relevant so I'm planning to use:

<!--[if IE]>
less than IE10
<![endif]-->

Is there an AngularJS way of detecting support for its features? Should I be checking for old versions of Chrome/Safari at all?

like image 823
Cekk Avatar asked Feb 25 '14 13:02

Cekk


1 Answers

In our project we use html conditional comment to detect which version of IE is running. Something among the lines:

<!--[if IE 8]><html class="lt-ie9"><![endif]-->

You can also use Modernizr which has feature detection.

In terms of other browsers you should be fine, since they update themselves regularly and we haven't find any particular issue related only to one specific version.

like image 120
Wawy Avatar answered Nov 20 '22 07:11

Wawy