Router issue (v6)

Hi, guys have a question about v6, so on ‘pageInit’ when I try to navigate to other page with ‘$f7.router.navigate(’/home/’);’ but I am getting an error,

‘Framework7: it is not allowed to use router methods on global app router. Use router methods only on related View, e.g. app.views.main.router.navigate’ and it’s single view app.

sample code:
export default function (props, {
$f7,
$on,
$onBeforeMount,
$onMounted,
$onBeforeUnmount,
$onUnmounted
}) {

$on('pageInit', (e, page) => {

$f7.router.navigate(’/home/’);
});
})

Thank you in advance!

I figured it out,

added ‘$f7router’ to

export default function (props, {
$f7,
$f7router,
$on,
$onBeforeMount,
$onMounted,
$onBeforeUnmount,
$onUnmounted
}) {

…and then I was able to use ‘$f7router’ on page events

$f7router.navigate(’/home/’);