17.0.0 • Published 3 months ago

ng-modal-factory v17.0.0

Weekly downloads
126
License
MIT
Repository
-
Last release
3 months ago

WARNING!

:rotating_light: :rotating_light: :rotating_light:

This package is still under development and is not optimized nor tested. Please have some time and check back later ;)

:rotating_light: :rotating_light: :rotating_light:

NG Modal Factory

The purpose of this packages is to allow the display a (modal-)component, within everywhere inside of the application. The (modal-)component will be rendert inside of the outlet.

Installation

$ npm i ng-modal-factory

Quick Start

1. Import the Module

@NgModule({
  ...
  imports: [
    ...,
    ModalFactoryModule
  ]
  ...
})
export class AppModule { }

2. Place the outlet

...
<ng-modal-factory-outlet></ng-modal-factory-outlet>
...

3. Open a Modal (This example was using the Clarity Design Framework)

public openModal()
  {
    this.modalFactoryService.openNewAlertModal({
      component: AlertModalComponent, <-- Your modal component
      inputs: {
        bodyTemplate: this.modalBody, <-- Your modal body
        buttons: [
          {
            text: 'custom',
            style: 'link',
            click: () => console.log('custom')
          },
          {
            text: 'Cancel',
            style: 'outline',
            click: () => console.log('Cancel'),
          },
          {
            text: 'Ok',
            type: 'primary',
            click: () => console.log('Ok'),
          },
        ],
      },
    });
  }
15.0.4

3 months ago

17.0.0

3 months ago

15.0.0

1 year ago

15.0.1

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.3

2 years ago

0.1.0

3 years ago

1.0.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago