An angular service which expose sweetalert in angular way
npm install angular-h-sweetalert![][bower-url]
[![NPM version][npm-image]][npm-url]
![][david-url]
![][dt-url]
![][license-url]
An angular service which expose sweetAlert2 functions in angular way.
2.x and 1.x? ##Since sweetAlert is unmaintained. I choose sweetAlert2 as new interface. See below:
Reason of creating this fork is inactivity of original SweetAlert plugin
- [angular][angular-url]
- [sweetalert2][sweetalert2-url]
``bash`
npm install --save sweetalert2 angular-h-sweetalert
`bash`
bower install --save sweetalert2 angular-h-sweetalert
`javascript`
import 'sweetalert2/dist/sweetalert2.min.css';
import {ngSweetAlert2} from 'angular-h-sweetalert';
`javascript`
require('sweetalert2/dist/sweetalert2.min.css');
const {ngSweetAlert2} = require('angular-h-sweetalert');
`html
`
`javascript
const demo = angular.module('demo', [ngSweetAlert2]);
demo.controller('demoController', ['$scope', 'swal', function($scope, swal) {
$scope.basic = function() {
swal(
'The Internet?',
'That thing is still around?',
'question'
);
};
}]);
``
Looking for more usage examples?, check: examples
[angular-url]: https://angularjs.org/
[sweetalert2-url]: https://github.com/limonte/sweetalert2
[bower-url]: https://img.shields.io/bower/v/angular-h-sweetalert.svg
[npm-url]: https://npmjs.org/package/angular-h-sweetalert
[npm-image]: https://badge.fury.io/js/angular-h-sweetalert.png
[david-url]: https://david-dm.org/leftstick/angular-h-sweetalert.png
[dt-url]:https://img.shields.io/npm/dt/angular-h-sweetalert.svg
[license-url]:https://img.shields.io/npm/l/angular-h-sweetalert.svg