Author: | cipchk |
---|---|
Official Page: | Go to website |
Publish Date: | November 13, 2017 |
License: | MIT |
Description:
An Angular 2+ component to create and manage Bootstrap 3/4 based modal windows.
Installation:
npm install ngx-bootstrap-modal –save
Usage:
import { Component } from '@angular/core'; import { ConfirmComponent } from './confirm.component'; import { DialogService } from "ngx-bootstrap-modal"; @Component({ selector: 'app', template: ` <div class="container"> <button class="btn btn-default" (click)="dialogService.alert('Confirm', 'Are You Sure');">Show confirm</button> <button class="btn btn-default" (click)="showConfirm()">Show confirm</button> </div> ` }) export class AppComponent { constructor(public dialogService:DialogService) {} showConfirm() { this.dialogService.confirm('Confirm', 'Are You Sure', <BuiltInOptions>{ }).then((result: boolean) => { // result }); } }