2.0.0 • Published 3 years ago

md-dialogs v2.0.0

Weekly downloads
13
License
MIT
Repository
github
Last release
3 years ago

Material Dialogs Helper Module

This is to simplify MatDialogs from @angular/material package but wrapping it in a service.

Currently it supports:

  • Confirm Dialog

Try it out here: https://stackblitz.com/edit/md-dialogs-helper

Getting started

  1. Install from npm npm i md-dialogs -s
  2. Import the module MdDialogsHelperModule to your own module
  import { MdDialogsHelperModule } from 'md-dialogs';

  @NgModule({
    declarations: [
      ...
    ],
    imports: [
      ...
      MdDialogsHelperModule,
    ]
  })
  export class AppModule { }
  1. Inject the MdDialogsHelperService service
  2. Call it like the following:
  import { MdDialogsHelperService } from 'md-dialogs';
  constructor(private dialogs: MdDialogsHelperService) {}

  public openConfirmDialog() {
    this.dialogs
      .confirm('Confirm Dialog')
      .subscribe((result) => {
        /*
          result will be true or false
          depending on user clicking OK or cancelling
        */
      });
  }
2.0.0

3 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

7 years ago