Paper-menu with icons with sub-menu

366 views
Skip to first unread message

Ruslan Zhunusov

unread,
May 26, 2016, 1:01:40 AM5/26/16
to Polymer
What is correct way to make sidemenu with paper-menu with list of items that use icons on the left.

<paper-menu>
<paper-submenu>
 
<paper-icon-item>
 
<iron-icon icon="inbox" item-icon></iron-icon>
 Inbox
 
</paper-icon-item>
 
<paper-menu class="menu-content">
 
<paper-icon-item>
 
<iron-icon icon="inbox" item-icon></iron-icon>
Submenu 1
 
</paper-icon-item>
<paper-icon-item>
<iron-icon icon="inbox" item-icon></iron-icon>
Submenu 2
</paper-icon-item>
<paper-icon-item>
<iron-icon icon="inbox" item-icon></iron-icon>
Submenu 3
</paper-icon-item>
 
</paper-menu>
 
</paper-submenu>
<paper-icon-item>
<iron-icon icon="inbox" item-icon></iron-icon>
Second menu
</paper-icon-item>
</paper-menu>

Not working.

Karl Tiedt

unread,
May 26, 2016, 1:07:03 AM5/26/16
to Ruslan Zhunusov, Polymer
Can you be more specific on what what isn't working? Or maybe provide a JSbin? As this stands, it sounds like you are expecting menus to open to the side of the parent menu and that isn't how paper-menu/submenu work...

-Karl Tiedt

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/dec6e8e2-d10d-4d84-a17d-89c954e134a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruslan Zhunusov

unread,
May 26, 2016, 2:24:56 AM5/26/16
to Polymer, ren...@gmail.com
I'm not expecting it to open on the side of the parent element. Where do you see that?

Can you show how it is done correctly then. Simple

paper-menu sidemenu with submenu with icons on the left of each menu item.

Ruslan Zhunusov

unread,
May 26, 2016, 11:27:04 PM5/26/16
to Polymer
So no one can answer this simplest question?
How to make sidemenu (which have icons) with submenu (which have icons).

Karl Tiedt

unread,
May 27, 2016, 3:01:13 AM5/27/16
to Ruslan Zhunusov, Polymer
Well without you answering questions more completely or with more meaningful answers, this is the best I can do for you, here is the PSK with a menu and icons... no submenu, but they work the same...

https://polymerelements.github.io/polymer-starter-kit/

Seriously though, a little bit of effort in explaining exactly what you are looking for more clearly, particularly with *functional* examples in a JSbin or Plnkr will go a lot farther than your previous emails.

-Karl Tiedt

Follow Polymer on Google+: plus.google.com/107187849809354688692

---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.

Ruslan Zhunusov

unread,
May 27, 2016, 3:26:26 AM5/27/16
to Polymer, ren...@gmail.com
This is simple question.
I didn't ask for menu without submenu. 

But menu(with icons) with submenu(with icons)
sidebar.png

Karl Tiedt

unread,
May 27, 2016, 3:30:04 AM5/27/16
to Ruslan Zhunusov, Polymer
Well then the link answers your question, menu and submenu apply the icons the same way. You can find the code for that in the github repo associated with the demo.

-Karl Tiedt

Ruslan Zhunusov

unread,
May 27, 2016, 3:36:11 AM5/27/16
to Polymer, ren...@gmail.com
No its not unfortunately.

Karl Tiedt

unread,
May 27, 2016, 3:41:21 AM5/27/16
to Ruslan Zhunusov, Polymer
By all means, prove me wrong with a functional example and I will happily help adjust it into a working state. Here is a JSbin template to start from: http://jsbin.com/tedecinuhu/1/edit?html,console

-Karl Tiedt

Ruslan Zhunusov

unread,
May 27, 2016, 3:44:13 AM5/27/16
to Polymer, ren...@gmail.com
Look at my first post.
And if you don't have solution don't answer please.

Karl Tiedt

unread,
May 27, 2016, 4:00:06 AM5/27/16
to Ruslan Zhunusov, Polymer
Your first post is an incomplete HTML fragment, which was conveniently captioned "Not working". If you could demonstrate what "Not working" actually is with the requested functional example you probably would have had a lot more targeted answeres by now, however since you wish for an answer soley based on your first email, here you go:
  1. Invalid HTML, missing <html> and <body> tag, probably want a <head> in there to where you import the missing items below.
  2. not including polyfils (no mention of what browser you are trying this on, so just being thorough)
  3. not including polymer.html
  4. no web components have been imported
    • paper-menu/paper-menu.html
    • paper-icon-item/paper-icon-item.html
    • iron-icon/iron-icon.html
    • iron-icons/iron-icons.html
Good luck!

-Karl Tiedt

Ruslan Zhunusov

unread,
May 27, 2016, 8:32:47 AM5/27/16
to Polymer, ren...@gmail.com
Thank you for useless answers. 
Reply all
Reply to author
Forward
0 new messages