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:
我必须检查使用的浏览器是否支持使用AngularJS版本1.2.12的我的网站。目标是向旧版本的Chrome / Safari / IE显示一条消息,说明“更新/更改您的浏览器”。一般建议使用特征检测,但是对于这样的问题:https://github.com/angular/angular.js/issues/4749其中select元素不刷新它们的值,以及其他一些IE8问题,特征检测没有似乎相关,所以我打算使用:
<!--[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?
是否有AngularJS检测其功能支持的方法?我应该检查旧版Chrome / Safari吗?
1 个解决方案
#1
5
In our project we use html conditional comment to detect which version of IE is running. Something among the lines:
在我们的项目中,我们使用html条件注释来检测正在运行的IE版本。线条之间的东西:
<!--[if IE 8]><html class="lt-ie9"><![endif]-->
You can also use Modernizr which has feature detection.
您还可以使用具有特征检测功能的Modernizr。
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.
对于其他浏览器,您应该没问题,因为它们会定期更新,我们没有发现任何与特定版本相关的特定问题。
#1
5
In our project we use html conditional comment to detect which version of IE is running. Something among the lines:
在我们的项目中,我们使用html条件注释来检测正在运行的IE版本。线条之间的东西:
<!--[if IE 8]><html class="lt-ie9"><![endif]-->
You can also use Modernizr which has feature detection.
您还可以使用具有特征检测功能的Modernizr。
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.
对于其他浏览器,您应该没问题,因为它们会定期更新,我们没有发现任何与特定版本相关的特定问题。