Skip to content

Provides a simple way to detect the IE or Edge browser and their version.

License

Notifications You must be signed in to change notification settings

Turtleguyy/ember-cli-ie-detect

Repository files navigation

ember-cli-ie-detect

This ember addon provides a simple way to detect the IE or Edge browsers and their version.

Installation

ember install ember-cli-ie-detect

Usage

The method is available as a service, injected into files.

export default Ember.Controller.extend({
  ieDetect: Ember.inject.service(),
})

After injecting the service, it's pretty straight forward to use.

this.get('ieDetect.version') >= 12     // Edge
this.get('ieDetect.version') < 12      // IE
this.get('ieDetect.version') === false // Not IE or Edge

Simple as that.

Attributions

This addon is based on a codepen by Mario Pizzinini.

About

Provides a simple way to detect the IE or Edge browser and their version.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •