(sorry for my bad english)
Hello. How can I make a fixed menu and changing html like vscode on the electron.js? For example, get a menu. We have 3 html files in one:
page1.html
page2.html
page3.html
When I click on page1
in the menu, it will go to page1 and the menu will remain fixed. At the same time, when I click on page2, it will go to page2 and again, the menu will remain fixed.I tried redirected to the html pages as follows:
ipcMain.on("goPage1",(err,data) => {
mainWindow.loadURL(`file://${__dirname}/page1.html`)
})
right its work,but I do not know this correct. In fact, I can do this to keep the menu fixed on every page, maybe, get a base.html
. here get a menu.Also get a div element with the id # myDiv
. Let's do page1.html
. I don't know if this is the right way. To summarize the topic: How can we make a fixed menu like vscode and changing pages? What I said above is the right way? What is the best way to do them?
Thank you for reading so far, my friend. I will be very happy if you answer my questions. I am looking forward to your reply.thanks now...