Socket
Socket
Sign inDemoInstall

angular-bowser

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-bowser

AngularJS browser detection kit


Version published
Weekly downloads
183
decreased by-12.02%
Maintainers
1
Install size
2.01 MB
Created
Weekly downloads
 

Changelog

Source

0.0.4

  • Add npm support
  • Update bowser code to use version 1.3.0

Readme

Source

angular-bowser

This is a simple AngularJS service to provide browser information. It's heavily based on bowser code.

Dependencies

None except for AngularJS.

Install

bower install --save angular-bowser

OR

npm install --save angular-bowser

Usage

Include src/angular-bowser.js in your html.

<script src="node_modules/angular-bowser/src/angular-bowser.js"></script>

Add the angular-bowser module as a dependency to your application module:

angular.module('MyApp', ['jlareau.bowser']);

Inject the service where you need it. A good place is in the run section of your application.

angular.module('MyApp')
    .run(['bowser', function(bowser) {
    
        if ( bowser.msie && bowser.version <= 6 ) {
        
            alert(`${bowser.name}, Seriously?!`);
            
        }
    
    }]);

Properties

Example of properties are: firefox, chrome, msie, opera, android, ios, safari

The browser version is always in the version property.

For more information, please check bowser.

See also

ng-device-detector

Keywords

FAQs

Last updated on 31 May 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc