Javascript not working

I have this route but the Javascript doesn’t work, doesn’t do anything without generating any error
. Do you have any ideas?

{
path: ‘/vicinoame/’,
url: ‘./vicinoame.html’,
component: {
on: {
pageMounted: function(e, page) {
app.dialog.alert(‘Cerco i monumenti vicino a te…’);

    }
  }
}

}
];
`

I tried also doing this, but it’s also not working

$$(document).on(‘pageInit’, function(e){
$.getScript(“js/” + e.name +".js");
});

between script tags

Neither:
{
path: ‘/vicinoame/’,
url: ‘./vicinoame.html’,
component: {
on: {
pageInit: function (e) {
var script = document.createElement(‘script’);
script.src = ‘vicinoame.js’;
document.head.appendChild(script);
}
}
}
}
];

works