I found that Autocomplete(ac) implements the routableModals of Standalone Autocomplete via ac.view.router.navigate. So I also want to implement the popup’s routableModals by this method (I know that F7 provides routeModal, but I want to implement a similar function page.
A lot, I don’t want to configure a route for each page, so I thought of a similar implementation to ac.)
This code is like this in ac, I wrote it like this.
ac.view.router.navigate({
url: ac.url,
route: {
path: ac.url,
popup: popupParams,
},
});
window.app.router.navigate({
url: "routemodal/",
route: {
path: "routemodal/",
popup: {
content: `
<div class="popup my-popup">
<div class="view">
asdasd
</div>
</div>
`,
on: {
popupOpen(popup) {
console.log(popup);
},
popupOpened(popup) {
console.log(popup, 1);
}
}
}
}
});
But I can’t achieve the same effect;
I got some information in this pageBeforeEnter event.
This means that the route did not listen to my parameters.
But it did in ac;
I want to know how to deal with this problem, thanks!