@kolektor/nucleus-common
v0.1.2192
Published
Nucleus Common is a library that provides a service for managing device information and interactions in an Angular application. It's designed to work with [Angular](https://angular.io/). and [Capacitor](https://capacitorjs.com/).
Readme
Overview
Nucleus Common is a library that provides a service for managing device information and interactions in an Angular application. It's designed to work with Angular. and Capacitor.
Peer Dependencies
The library has the following peer dependencies:
@angular/core@capacitor/app@capacitor/browser@capacitor/device
Usage
The main service provided by the library is NucleusAppService. This service provides methods to interact with the device and the app.
Here is a brief overview of the methods and properties provided by the NucleusAppService:
init(): Initializes the service. This method must be called before using any other methods.deviceInfo: Returns information about the device.platform: Returns the platform on which the app is running:ios,android,electron,web,ios-pwaorpwaisAppLike: Returns whether the app is running in an app-like environment.isPwa: Returns whether the app is a Progressive Web App (PWA).isNative: Returns whether the app is a native app.launchUrl: Returns the launch URL of the app.openInBrowser(url: string): Opens the specified URL in the browser.
Running unit tests
Run nx test nucleus-common to execute the unit tests.
