Hi I have an app using NW.JS and angularjs. But the problem is, I want to open a new window (that loads a new page from within the app) without inheriting the menubar from the main window's menu. Is this possible in nwjs? Also every time I click the menu item from main window menubar that triggers the opening of new window it always open new window. How can I prevent this? I mean, when I already open the new window, the app should refrain from opening it again unless it was already closed.
in my index.html
var menu = new nw.Menu({ type: 'menubar' });
var submenu = new nw.Menu();
submenu.append(new nw.MenuItem({
label: 'Exit',
click: function(){
nw.App.quit();
}
}));
menu.append(new nw.MenuItem({
label: 'File',
submenu: submenu
}));
menu.append(new nw.MenuItem({
label: 'New Page',
click: function(){
nw.Window.open('index.html#/new_page')
}
}));
nw.Window.get().menu = menu;
When opening new window you are using same html file which contains code to create menu bar, so it is obviously going to create menu bar for popup window also, you need to use different html file for popup window.
Below is the full version of code, let me know if it is not working for you
index.html
home.html