0.2.7 • Published 6 years ago

ngx-sweetalert2 v0.2.7

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

ngx-sweetalert2

Sweetalert2 for angular x cli application.

Install

npm i -s ngx-sweetalert2

Usage

Add the following sections to the .angular.cli.json file.

"styles": [
"../node_modules/sweetalert2/dist/sweetalert2.css"
],
"scripts": [
"../node_modules/sweetalert2/dist/sweetalert2.js"
],

Next, inject SweetAlertService into a component or module:

import { SweetAlertService } from 'ngx-sweetalert2';

@Component({
  providers: [SweetAlertService]
})
export class MyComponent {
  constructor(private _swal2: SweetAlertService) {
    this._swal2.success({ title: 'This is a alert' });
  }
}
import { SweetAlertService } from 'ngx-sweetalert2';

@NgModule({
  providers: [SweetAlertService]
})
0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago