mean.js menu isPublic not working mean.js menu isPublic not working mongodb mongodb

mean.js menu isPublic not working


If you look in menus.client.services.js in the core module of mean.js the last line looks like this: this.addMenu('topbar');. If you change it to this.addMenu('topbar', true);. You will see all your menu items showing on the topbar when you aren't logged in. Then you can add your menu item like in your example or without the true as it will inherit it from the setting that was just changed:

Menus.addMenuItem('topbar', 'Talks', 'talks', 'dropdown', '/talks(/create)?');ORMenus.addMenuItem('topbar', 'Talks', 'talks', 'dropdown', '/talks(/create)?', true);

Or like below if you now want it to hide when not signed in:

Menus.addMenuItem('topbar', 'Talks', 'talks', 'dropdown', '/talks(/create)?', false); 

I hope this helps.