angular-bowser

WebJar for angular-bowser

License

License

MIT
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

angular-bowser
Last Version

Last Version

0.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

angular-bowser
WebJar for angular-bowser
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/jacqueslareau/angular-bowser

Download angular-bowser

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-bowser/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-bowser</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-bowser/
implementation 'org.webjars.bower:angular-bowser:0.0.4'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-bowser/
implementation ("org.webjars.bower:angular-bowser:0.0.4")
'org.webjars.bower:angular-bowser:jar:0.0.4'
<dependency org="org.webjars.bower" name="angular-bowser" rev="0.0.4">
  <artifact name="angular-bowser" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-bowser', version='0.0.4')
)
libraryDependencies += "org.webjars.bower" % "angular-bowser" % "0.0.4"
[org.webjars.bower/angular-bowser "0.0.4"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : angular jar [1.3.0,2)

Project Modules

There are no modules declared in this project.

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

Versions

Version
0.0.4