Coder Social home page Coder Social logo

singhmohancs / ng-device-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srfrnk/ng-device-detector

0.0 3.0 0.0 418 KB

Angular module to detect OS / Browser / Device

Home Page: http://srfrnk.github.io/ng-device-detector

License: MIT License

JavaScript 100.00%

ng-device-detector's Introduction

#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

ng-device-detector's People

Contributors

srfrnk avatar mariendries avatar joeylgutierrez avatar qpitlove avatar crisandretta avatar javierprovecho avatar kim-jeongki avatar

Watchers

Mohan Singh avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.