@rbtech.dev/angular-winbox

1.0.0 • Public • Published

angular-winbox

A wrapper component for WinBox.js with the ability to mount Angular components.

Installation

//

Usage

The service return an instance of a Winbox, which wraps Winbox.js and the component's instance.

const winboxWrapper = this.winBoxService.openWinBox(
                {
                  title: "Winbox",
                  height: '90%',
                  width: '40%',
                  x: 'center',
                  y: 'center',
                  onclose: () => {
                    this.cdRef.detectChanges();
                    return false;
                  },
                },
                SampleComponent
              );
// It is possible to access to component's properties.
winboxWrapper.instance.value = 5;
winboxWrapper.winBox.close();

Methods and Properties

constructor(winBoxService : WinboxService) {}

// Open the last created WinBox.
this.winBoxService.showLastWinbox();

// Close all the created winBox.
this.winBoxService.closeAllWinBoxes();

// Boolean that indicates if there is at least one created Winbox.
const isThereAWinBox = this.wiBoxService.isThereAWinBox;

/@rbtech.dev/angular-winbox/

    Package Sidebar

    Install

    npm i @rbtech.dev/angular-winbox

    Weekly Downloads

    8

    Version

    1.0.0

    License

    none

    Unpacked Size

    11.3 kB

    Total Files

    16

    Last publish

    Collaborators

    • giuseppe.pennisi
    • sniperwolf