0.0.4 • Published 4 years ago

simple-ng-dialog v0.0.4

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

simple-ng-dialog

Live demo here...

Install

npm i simple-ng-dialog

Usage

app.module

import { DialogService, DialogModule } from 'simple-ng-dialog';

add the dialog anchor tag to app.component.html

<sng-dialog-anchor defaultCaption="My Caption"></sng-dialog-anchor>

in your component

<sng-dialog *ngIf="showDialog" (close)="showDialog=false" (ok)="onOk($event)">Dialog 1 content</sng-dialog>

or in your code:

import { DialogService } from 'simple-ng-dialog';
...
constructor (
  private dialogService: DialogService,
) { }
...
prompt() {
  this.dialogService.prompt('My test prompt', 'Prompt caption');
}

confirm() {
  this.dialogService.confirm('Are you sure?').then(resp => alert(resp));
}

inputBox() {
  this.dialogService.inputBox('Type some input', 'default val').then(v => {
    alert('new value: ' + v);
  })
}
0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

5 years ago

0.0.1

5 years ago