How to redirect to another page when in Ajax?

Hi,

I am not sure I understand the doc, How do you redirect to another page during an ajax call?

    500: function (response) { //error
      app.dialog.close();
      console.log("error 500");
     //This does not work
      resolve({
        componentUrl: './pages/login.html',
      })

Is there a way to redirect to this path /login/ as I have created this route in my routes.js:

path: ‘/login/’,
url: ‘./pages/login.html’,

Thanks

This does not work either
mainView.router.loadPage(’./pages/login.html’);

So noone knows how to redirect the user to a different view?
’./pages/login.html’,

Ok got it I think it is
app.router.navigate(’./pages/login.html’);