So i’m using phonegap/framework7 for an app i’m working on
i have the following ajax call which works just fine…
$.ajax({
method: "POST",
url: myApi+ "ratings",
data: ratingForm,
success: function() {
//works fine
alert("test success");
//this part doesn't work!
app.router.navigate("/success/");
},
error: function () {
app.dialog.alert('We apologize, an error
occurred while trying to saving your rating. Please try
again.');
}
});
The part not working is the app.router.navigate("/success/"); part. I have no errors in the console. This function DOES work if called from anywhere else in the program, so i’m not sure how to handle redirecting after an ajax success, any help would be much appreciated.