@kolektor/nucleus-common
TypeScript icon, indicating that this package has built-in type declarations

0.1.735 • Public • Published

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-pwa or pwa
  • isAppLike: 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.

Readme

Keywords

none

Package Sidebar

Install

npm i @kolektor/nucleus-common

Weekly Downloads

19

Version

0.1.735

License

none

Unpacked Size

18.6 kB

Total Files

9

Last publish

Collaborators

  • jpurgar