New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-device-detector

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-device-detector

Uses user-agent to set css classes or directly usable via JS.

  • 4.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-51.4%
Maintainers
1
Weekly downloads
 
Created
Source

#ng-device-detector ##Angular module to detect OS / Browser / Device

Build Status

Uses user-agent to set css classes or directly usable via JS. See website: http://srfrnk.github.io/ng-device-detector

Install

  • Run $ bower install ng-device-detector --save
  • Add script load to HTML:<script type="text/javascript" src=".../re-tree.js"></script>
  • Add script load to HTML:<script type="text/javascript" src=".../ng-device-detector.js"></script>
  • Add module to your app dependencies: ...angular.module("...", [..."ng.deviceDetector"...])...
  • To add classes - add directive like so- <div ... device-detector ...>
  • To use directly add "deviceDetector" service to your injectors...

deviceDetector service

Holds the following properties:

  • raw : object : contains the raw values... for internal use mostly.
  • os : string : name of current OS
  • browser : string : name of current browser
  • device : string : name of current device

Support

At first I added just major browser, OS, device support. With help from mariendries,javierprovecho and crisandretta more support was added. [The current list of supported browser,OS, device can be easily viewed in here] (https://github.com/srfrnk/ng-device-detector/blob/master/ng-device-detector.js).

Pull-requests with new stuff will be highly appreciated :)

Example

See plunker

License

MIT License

Keywords

FAQs

Package last updated on 03 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc