angularjs-sweetalert2

1.0.0 • Public • Published

AngularJS wrapper for SweetAlert2

AngularJS wrapper for SweetAlert2. Sweet Alert is a beautiful replacement for Javascript's "Alert".

Usage

SweetAlert2.fire({
  title: 'Are you sure?',
  text: "You won't be able to revert this!",
  icon: 'warning',
  showCancelButton: true,
  confirmButtonColor: '#3085d6',
  cancelButtonColor: '#d33',
  confirmButtonText: 'Yes, delete it!'
}).then((result) => {
  if (result.value) {
    Swal.fire(
      'Deleted!',
      'Your file has been deleted.',
      'success'
    )
  }
})

Demo

http://recepuncu.github.io/ngSweetAlert2/

Dependencies

Install

  1. download the files
    1. Bower
      1. add "angular-sweetalert2": "latest" to your bower.json file then run bower install OR run bower install angular-sweetalert2
  2. include the files in your app
    1. SweetAlert2.min.js
    2. sweetalert2.min.js"
    3. sweetalert2.min.css
  3. include the module in angular (i.e. in app.js) - recepuncu.ngSweetAlert2

Documentation

Package Sidebar

Install

npm i angularjs-sweetalert2

Weekly Downloads

101

Version

1.0.0

License

MIT

Unpacked Size

5.79 kB

Total Files

6

Last publish

Collaborators

  • recepuncu