ngSweetAlertFull

An Angularjs module with full feature of sweetalert libarary. Sweet Alert is a beautiful replacement for Javascript's "Alert"
Homepage:
1 person uses it

An Angularjs module with full feature of sweetalert libarary.

It's a directive and a provider to use sweetalert in js code and in html.

these mudole use:

SweetAlert AngularJS wrapper that is https://github.com/oitozero/ngSweetAlert develop by: https://github.com/oitozero

and

ng-sweet-alert an angularjs directive that is https://github.com/tushariscoolster/ng-sweet-alert develop by: https://github.com/tushariscoolster

tnx for all.

if you need just a directive to use in html or need just fire sweetalret from your js code you can use one of tushariscoolster sn-sweet-alert directive or oitozero ngSweetAlert wrapper but when need both of them (like me) use ngSweetAlertFull.

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

Demo

https://github.com/Mehrdad-Dadkhah/ngSweetAlert/demo

or:

http://oitozero.github.io/ngSweetAlert/

and

http://tushariscoolster.github.io/ng-sweet-alert/

Dependencies

Install

  1. download the files
    1. Bower
      1. add "ngSweetAlertFull": "latest" to your bower.json file then run bower install OR run bower install ngSweetAlertFull
  2. include the files in your app

    1. SweetAlert.js
    2. ngSweetAlertFull.js OR sweet-alert.min.js
    3. sweet-alert.css
    4. jquery.min.js when need to use directive (when use sweet-alert in html) ```html

    ```

  3. include the module in angular (i.e. in app.js) - ngSweetAlertFull javascript angular.module("testApp", ['ngSweetAlertFull']);

Examples

use in js: javascript SweetAlert.swal({ title: "Are you sure?", text: "Your will not be able to recover this imaginary file!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", closeOnConfirm: false }, function(){ SweetAlert.swal("Booyah!"); });

or use in html: html <a class="btn" style="background-color:blue" sweet-on-confirm="checkConfirm()" sweet-on-cancel="checkCancel()" name="login-submit" sweet-cancel-option="{{sweet.cancel}}" sweet-confirm-option="{{sweet.confirm}}" sweet-options="{{sweet.option}}" sweet-alert-tag >Try It</a>

Documentation

you can see https://github.com/Mehrdad-Dadkhah/ngSweetAlertFull/demo/index.html

or

comments powered by Disqus
This page was last updated almost 2 years ago.