ngSweetAlert icon indicating copy to clipboard operation
ngSweetAlert copied to clipboard

SweetAlert: Unknown alert type: input

Open mrchacon opened this issue 9 years ago • 8 comments

I'm trying to use an input type text on a sweet alert but it's not working and there's a log with "SweetAlert: Unknown alert type: input".

I'm using AngularJS and coffescript.

Any help?

Thanks.

Here's my swal:


$scope.updateState = (_state) ->
            swal {
                title: "Give \"" + _state.key +  "\" a new name!"
                text: "You will change this state name"
                type: "input"
                inputPlaceHolder: "State name"
                showCancelButton: true
                confirmButtonColor: "#387596"
                confirmButtonText: "Save"
                closeOnConfirm: true
            },(inputValue) ->
                console.log inputValue

mrchacon avatar Apr 24 '15 14:04 mrchacon

same here ! please guys work on it

max1011 avatar May 07 '15 19:05 max1011

@mrchacon i fixed it, just download the new version of sweet alert, if you are using bower just update to 0.5 not 0.3 it will work, (if you are using require.js, AMD there is another bug if you have it i'll tell you how to fix it)

max1011 avatar May 07 '15 19:05 max1011

i fixed it too with the @max1011 solution

QuentinBontemps avatar Jul 07 '15 09:07 QuentinBontemps

I just used bower update to fix.

Can't the sweetalert dependency be updated to 0.5 to fix it ?

brunomperes avatar Jul 23 '15 15:07 brunomperes

@max1011 the update didn't solve it. Using require.js

ghost avatar Jul 17 '16 11:07 ghost

I'm using v5.3.1 from CDNJS and I'm getting this error as well.

matmunn avatar Oct 15 '16 10:10 matmunn

Fixed. Change the ngSweetAlert dependecie for ^0.5.0

nicolasvasquez avatar Nov 18 '16 00:11 nicolasvasquez

@purdel Fixed this by updating the package.json sweetalert dependency from: ^0.4.2 to ^1.0.0

Would you be able to make the update?

danj565 avatar Jun 21 '18 18:06 danj565