How to navigate to another page on ajax success? I can't get it working! please help

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.

console.dir下app.router,上更多代码吧

thanks, i was able to figure it out…
I have the following view…

var composeView = app.views.create('#view-compose', { url: '/compose/' });

and on my ajax success i’m now doing…

composeView.router.navigate("/success/");

and it is working perfect now. thanks for your reply