ng-alert-box-popup
Version:
`ng-alert-box-popup` is an Angular library that provides a customizable alert box component with support for different types of alerts using SweetAlert2.
69 lines (62 loc) • 2.99 kB
JavaScript
import * as i0 from '@angular/core';
import { Injectable, NgModule } from '@angular/core';
import swal from 'sweetalert2';
class NgAlertBoxService {
constructor() { }
}
NgAlertBoxService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
NgAlertBoxService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxService, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
class NgAlertBoxComponent {
constructor() { }
ngOnInit() {
}
dialog(type, msg) {
if (type.toUpperCase() == 'S') {
swal("Success!", msg, "success");
}
else if (type.toUpperCase() == 'E') {
swal("Error!", msg, "error");
}
else if (type.toUpperCase() == 'W') {
swal("Warning!", msg, "warning");
}
else if (type.toUpperCase() == 'I') {
swal("Info!", msg, "info");
}
}
}
NgAlertBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
NgAlertBoxComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxComponent, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxComponent, decorators: [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
class NgAlertBoxModule {
}
NgAlertBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NgAlertBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxModule });
NgAlertBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxModule, imports: [[]] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NgAlertBoxModule, decorators: [{
type: NgModule,
args: [{
declarations: [],
imports: [],
exports: []
}]
}] });
/*
* Public API Surface of ng-alert-box
*/
/**
* Generated bundle index. Do not edit.
*/
export { NgAlertBoxComponent, NgAlertBoxModule, NgAlertBoxService };
//# sourceMappingURL=ng-alert-box-popup.js.map