SubMenu Example
From WebOS101
Heres an example on how to create submenu's in the app menu. Its exactly the same as making the initial app menu except you nest another menu under one of the menu items
this.controller.setupWidget(Mojo.Menu.appMenu,
this.attributes = {
omitDefaultItems: false // if true uncomment the Mojo.Menu.* items in the model below
},
this.model = {
visible: true,
items: [
//Mojo.Menu.editItem,
{ label: "Menu Item", command: 'app-menuItem'},
{ label: "My SubMenu", items: [
{ label: "SubMenu 1", command: 'app-subMenu1'},
{ label: "SubMenu 2", command: 'app-subMenu2'}
]}//,
//Mojo.Menu.prefsItem,
//Mojo.Menu.helpItem
]
}
);