diff --git a/CHANGELOG.md b/CHANGELOG.md index 1380a1b..c11cae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.1.1 + +## Features + + - expose showInputError and close methods from swal object + + ## 1.1.0 ## Features diff --git a/SweetAlert.js b/SweetAlert.js index 79790e0..f143b32 100644 --- a/SweetAlert.js +++ b/SweetAlert.js @@ -50,13 +50,13 @@ angular.module('oitozero.ngSweetAlert', []) }, showInputError: function(message) { $rootScope.$evalAsync(function(){ - swal.showInputError( message ); - }); + swal.showInputError( message ); + }); }, close: function() { $rootScope.$evalAsync(function(){ - swal.close(); - }); + swal.close(); + }); } }; diff --git a/SweetAlert.min.js b/SweetAlert.min.js index 9f88c8e..d00b138 100644 --- a/SweetAlert.min.js +++ b/SweetAlert.min.js @@ -1 +1 @@ -"use strict";angular.module("oitozero.ngSweetAlert",[]).factory("SweetAlert",["$rootScope",function($rootScope){var swal=window.swal,self={swal:function(arg1,arg2,arg3){$rootScope.$evalAsync(function(){"function"==typeof arg2?swal(arg1,function(isConfirm){$rootScope.$evalAsync(function(){arg2(isConfirm)})},arg3):swal(arg1,arg2,arg3)})},success:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"success")})},error:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"error")})},warning:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"warning")})},info:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"info")})}};return self}]); \ No newline at end of file +"use strict";angular.module("oitozero.ngSweetAlert",[]).factory("SweetAlert",["$rootScope",function($rootScope){var swal=window.swal,self={swal:function(arg1,arg2,arg3){$rootScope.$evalAsync(function(){"function"==typeof arg2?swal(arg1,function(isConfirm){$rootScope.$evalAsync(function(){arg2(isConfirm)})},arg3):swal(arg1,arg2,arg3)})},success:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"success")})},error:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"error")})},warning:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"warning")})},info:function(title,message){$rootScope.$evalAsync(function(){swal(title,message,"info")})},showInputError:function(message){$rootScope.$evalAsync(function(){swal.showInputError(message)})},close:function(){$rootScope.$evalAsync(function(){swal.close()})}};return self}]);