Skip to content

salilvnair/ngx-platform-info

Repository files navigation

NgxPlatformInfo npm release

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.mobile); // returns boolean as true or false 
    console.log(ngxPlatformInfo.product); // returns value for mobile as the mobile type iPad, iPod 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
  }

}

About

A platform detection angular library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •