1.0.0-beta.2 • Published 9 years ago

ng2-openmodal v1.0.0-beta.2

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

ng2-openmodal npm version

A customizable modal for Angular 2

It uses the Bootstrap modal by default. You can also provide a custom modal view.

Features List

  • Default bootstrap modal layout
  • Customizable modal layout
  • Alert dialog
  • Customizable Alert component
  • Confirmation dialog
  • Customizable Confirmation component
  • Dialog result callback
  • Dialog dismiss callback
  • Dismiss validation
  • Good documentation

Basic Usage

  1. Install the package ng2-openmodal
npm install --save ng2-openmodal
  1. Add entries in the file systemjs.config.js
...

var map = {
  ...
  // Here it goes!
  'ng2-openmodal':              'node_modules/ng2-openmodal',
  ...
};

var packages = {
  ...
  'ng2-openmodal':              { main: 'index.js', defaultExtension: 'js' },
  ...
};
  1. Set the modal placement, e.g.
import { ModalService } from 'ng2-openmodal';

...

@ViewChild('modalPlacement', {read: ViewContainerRef}) modalPlacement: ViewContainerRef;

...

this.modalService.setPlacement(this.modalPlacement);
  1. TODO Invoke ModalService.openModal
  2. Enjoy it!

TODO Modal response

TODO The ThenElse class

TODO Additional features

ModalService methods

  • TODO setModalLayout(type):
  • TODO setAlertComponent(type):
  • TODO setConfirmComponent(type):
  • TODO setPlacement(container: ViewContainerRef):
  • TODO openModal(componentType: any, title: string, contentParams?: any): ThenElse<any>
1.0.0-beta.2

9 years ago

1.0.0-beta.1

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0-beta.4

10 years ago

0.1.0-beta.3

10 years ago

0.1.0-beta1

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago