1.0.1 • Published 8 years ago

angular-sweetalert-2 v1.0.1

Weekly downloads
24
License
MIT
Repository
github
Last release
8 years ago

Angular Sweet Alert 2

Sweet Alert it's enough simple (maybe not?), so, here we have a simple port to Angular 1.x.

How to use?

npm install sweetalert2
  • Download & Install angular-sweetalert-2
npm install angular-sweetalert-2
  • Include socialbase.sweetAlert module
angular.module('yourmodule', ['socialbase.sweetAlert']);
  • Inject SweetAlert factory
Foo.$inject = ['SweetAlert']
Foo.$inject = ['SweetAlert']

function Foo(SweetAlert) {
  SweetAlert.swal({
    type: 'success',
    text: 'Hello world'
  }).then(function (response) {
    console.log('World says hello too!');
  }
}