Détail du package

ng-browser-detector

sibiraj-s62MIT4.0.3

AngularJs service to detect platform, browser and version

angularjs-browser-detector, platform-detector, ng-browser-detector, browser-detector

readme

ng-browser-detector Tests

A simple angularJs service to detect platform, browser and version.

live demo here

Getting Started

Installation

You can directly clone/download here

git clone https://github.com/sibiraj-s/ng-browser-detector.git

or use cdn

Minified:

//cdn.jsdelivr.net/npm/ng-browser-detector@latest/ng-browser-detector.min.js

Pretty Printed:

//cdn.jsdelivr.net/npm/ng-browser-detector@latest/ng-browser-detector.js

or

Install via Package managers such as npm or yarn

npm install browser-dtector
npm install ng-browser-detector

# or

yarn add browser-dtector
yarn add ng-browser-detector

Usage

Import the modules required for ng-browser-detector.

<script src="angular.min.js"></script>
<script src="browser-dtector.umd.min.js"></script>
<script src="ng-browser-detector.min.js"></script>

add ngBrowser dependency to the module

const app = angular.module('myApp', ['ngBrowser']);

in routes config

function BrowserDetectController($scope, appBrowser) {
  $scope.appBrowser = appBrowser;
}

app.controller('BrowserDetectController', ['$scope', 'appBrowser', BrowserDetectController]);

to get platform

appBrowser.getPlatformName();

refer https://github.com/sibiraj-s/browser-dtector#api for more info

A simple directive is included (usage : optional)

<body browser-detector></body>

the directive appends the browser details to element's class, if provided browser-detector="attr" then the details are added as attributes

changelog

CHANGELOG

All notable changes to this project will be documented in this file.

Tags

  • Features
  • Bug Fixes
  • Performance Improvements
  • Enhancements
  • Dependency Updates
  • Breaking Changes
  • Documentation
  • Internal
  • Unreleased

v4.0.3 (2022-01-30)

Bug Fixes

  • fix compatibility with browser-dtector (45eec70)

Internal

v4.0.2 (2020-12-13)

Internal

v4.0.1 (2020-07-02)

Documentation

  • fix release date in CHANGELOG (eb65c8a)

v4.0.0 (2020-07-02)

Breaking Changes

  • update browser-dtector to v3 (c6258e0)

v3.0.0 (2019-12-05)

Performance Improvements

  • require browser-dtector as external resource (acd4d66)

Dependency Updates

  • remove unwanted devDependencies (9f0097a)
  • bump devDependencies versions (347c80a)

Breaking Changes

<script src="angular.min.js"></script>
<script src="browser-dtector.umd.min.js"></script>
<script src="ng-browser-detector.min.js"></script>

v2.0.1 (2019-12-05)

Internal

v2.0.0 (2019-12-05)

Enhancements

Internal

  • migrate from travis-ci to Github actions (d7c0400)
  • use gulp task runner instead of grunt (0974658)
  • add karma unit tests (13eb077)

Dependency Updates

Breaking Changes

  • rename methods
    • getPlatform -> getPlatformName
    • getName -> getBrowserName
    • getVersion -> getBrowserVersion

v1.1.7 (2018-12-28)

Enhancements

  • use babel to transipile and minify output files (beb03d0)
  • migrate from unpkg cdn to jsdelivr (eca1e77)

Internal

  • extend LICENSE to year 2019 (3be368a)
  • remove grunt-contrib-uglify in favour of babel's minify preset (beb03d0)
  • replace eslint-config-standard with eslint-config-airbnb-base (beb03d0)
  • replace grunt-contrib-sass with grunt-sass (beb03d0)
  • convert source code to es6 syntax (beb03d0)

Dependency Updates

v1.1.6 (2018-10-05)

Dependency Updates

  • update grunt-contrib-uglify to v4.0.0 (2feb318)
  • update eslint to v5.6.1 (2376093)
  • update husky to v1.1.0 (2376093)
  • update grunt-contrib-connect to v2.0.0 (2376093)
  • update eslint-plugin-promise to v4.0.1 (2376093)

Internal

  • update github username (7f62d0a)
  • remove vscode settings in favour of editorconfig (ce31847)

v1.1.5 (2018-08-29)

Internal

  • just a code cleanup while applying standardJS rules to eslint (66cd563)

v1.1.4 (2018-07-28)

Just a Maintenance Patch

Internal

  • remove karma testing as karma has few vulnerabilities in its dependencies
  • run travis builds in trusty environment
  • mark repo as private to prevent accidental publish to npm registry
  • replace jshint with eslint for better performance
  • remove commitizen and cz-conventional-changelog dependency
  • add prepublish script to prevent direct execution of npm publish

v1.1.3 (2018-07-17)

Just a Maintenance Patch

Internal

  • hide unfinished AngularJS code while AngularJS is being loaded. (47d4dcd)
  • remove pullapprove
  • migrate to travis-ci.com

Dependency Updates

v1.1.2 (2018-07-10)

Just a Maintenance Release.

Dependency Updates

  • update devDependencies and repo maintenance (79d144c)

v1.1.1 (2018-03-27)

Internal

Dependency Updates

  • update devDependencies (4ec7a24)
  • update angular to v1.6.9 in demo (28aba37)

v1.1.0 (2018-02-07)

Features

  • detect Microsoft Edge browser (514a277)

Dependency Updates

v1.0.1 (2017-11-28)

Internal

  • publish only dist folder to npm registry
  • move dependencies to peerDependencies

Dependency Updates

  • update cz-conventional-changelog to v2.1.0
  • update angular to v1.6.7
  • update grunt-contrib-uglify to v3.2.1

Breaking Changes

  • bower installations will not be supported anymore, use npm or yarn

v1.0.0 (2017-07-11)

Features

  • Initial Release. Detect device platforms and browsers with versions