Skip to content

Sweet Alert 2 wrapper to Angular.js 1.x

License

Notifications You must be signed in to change notification settings

socialbase/angular-sweetalert-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Sweet Alert 2

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

Requirements

  • Node >=5.12
  • Yarn or Npm

How to use?

yarn add sweetalert2 --save Or npm install sweetalert2 --save
  • Download & Install angular-sweetalert-2
yarn add angular-sweetalert-2 Or 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!');
  }
}

About

Sweet Alert 2 wrapper to Angular.js 1.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •