I'm doing a simple fetch with a model directly in backbone.
This works perfectly.
model.fetch({
success: function () {
alert("success");
},
error: function () {
alert("error with data!!");
},
change: function () {
alert("change");
}
});
However I want to sent a parameter with the request, but when I do this, it stops working? No errors reported?
model.fetch({ data: { userId: userId} },{
success: function () {
alert("success");
},
error: function () {
alert("error with data!!");
},
change: function () {
alert("change");
}
});
Can anyone help? The request looks like to goes and comes back from the server perfectly?