0.0.4 • Published 4 years ago

ngx-platform-info v0.0.4

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

NgxPlatformInfo

A platform detection angular library

How to use:

export class AppComponent {
  title = 'ngx-platform-info-demo';
  constructor(private ngxPlatformInfo:NgxPlatformInfo) {
    console.log(ngxPlatformInfo.extract()); // returns object of PlatformInfo type with all data
    console.log(ngxPlatformInfo.os); // returns os name Windows, MacOS etc
    console.log(ngxPlatformInfo.version); // returns the version of the machine
    console.log(ngxPlatformInfo.browser); // returns the browser name
    console.log(ngxPlatformInfo.browserVersion);// returns the browser version with build number
    console.log(ngxPlatformInfo.browserMajorVersion); // returns the browser version without build number
    console.log(ngxPlatformInfo.screenSize);// returns the window screen size
    console.log(ngxPlatformInfo.manufacturer);// returns value for mobile as the mobile manufacturer
    console.log(ngxPlatformInfo.deviceType);// returns if its desktop or mobile
    console.log(ngxPlatformInfo.mobile); // returns boolean as true or false 
    console.log(ngxPlatformInfo.product); // returns value for mobile as the mobile type iPad, iPod etc use it with above
  }

}
0.0.4

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago