[SOLVED] Redirect afetr click modal button

Hi guys!
I’m just learning to work framework7 and i student.
I wonder how I can do the redirection to index. page (or another) after clicking a modal button.

My code routes.js:

var dialog = app.dialog.create({
title: ‘Error’,
text: ‘Hello World’,
buttons: [
{
text: ‘Back’,
}
],
}).open();

Please give an example code.

Thank you!

For example:

var dialog = app.dialog.create({
title: ‘Error’,
text: ‘Hello World’,
buttons: [
{
  text: ‘Back’,
  onClick: function () {
    app.views.router.main.navigate('/some-page/');
  },
}
],
}).open();

Thank you!
You did a great job! This is All Incredible!