How can I hold the page init event?

Hi everyone.

first init process (first launch app) I need to do some asynchronous operations. After these operations I want the first route to be loaded. I want to show a preloader during the process.

For this I defined app.on.init function async and called the necessary operations with await. But the first route ‘/’ is loaded without waiting for the process.

How can I make the first route wait for this process?

var app = new Framework7({
    on                      : {
        init        : async function(){
            // await somefunc()