oitozero / ngSweetAlert

AngularJS wrapper for SweetAlert
MIT License
617 stars 160 forks source link

SweetAlert: Unknown alert type: input #30

Open mrchacon opened 9 years ago

mrchacon commented 9 years ago

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
max1011 commented 9 years ago

same here ! please guys work on it

max1011 commented 9 years ago

@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)

QuentinBontemps commented 9 years ago

i fixed it too with the @max1011 solution

brunomperes commented 9 years ago

I just used bower update to fix.

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

ghost commented 8 years ago

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

matmunn commented 8 years ago

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

nicolasvasquez commented 7 years ago

Fixed. Change the ngSweetAlert dependecie for ^0.5.0

danj565 commented 6 years ago

@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?