eu-popup
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

eu-popup

Pop up service for Angular

Demo

Demo link

Getting started

Import EuPopupModule in app.module.ts -

import {EuPopupModule} from 'eu-popup';

Add it in 'imports' -

  imports: [
    EuPopupModule,
    ...
  ],

Import 'EuPopupService' in your component -

import {EuPopupService} from 'eu-popup';

Inject service in component

  constructor(private euPopupService: EuPopupService) {
  }

Open popup by calling the service -

      this.euPopupService.open({
          type: 'error',
          title: 'OOPS',
          text: 'I am a dynamic component inside of a dialog!',
          showCancelButton: true,
          cancelButtonText: 'No, cancel!',
          confirmButtonText: 'yes',
          dismissOnClickOutside: false,
          
        }
      ).afterClosed.subscribe(result => {
        console.log(result);
      });

Options

Option Type Default Values
type string undefined error, success, warning, info
title string undefined any string
text string undefined any string
cancelButtonText string undefined any string
confirmButtonText string undefined any string
dismissOnClickOutside boolean false true or false
showCancelButton boolean false true or false
showOkButton boolean false true or false

Package Sidebar

Install

npm i eu-popup

Weekly Downloads

19

Version

0.1.7

License

BSD-3-Clause

Unpacked Size

284 kB

Total Files

53

Last publish

Collaborators

  • shuaibmalik