What is the best practice for a polymer menu? -


i want build polymer app has drawer menu inside goes different pages when different items clicked.

so far i've considered 3 options:

option 1

using <iron-selector> in starter-kit.

option 2

using <paper-button> , add on-click function route desired page.

a few of these inside <app-drawer>:

<paper-button on-click="gotopage" id="my-page-one">page 1</paper-button>

and function in script:

gotopage(e){this.set("route.path", "/" + e.srcelement.id);}

option 3

using <paper-menu> , <paper-item> inside similare option 2:

<paper-item on-click="gotopage" id="my-page-one">page 1</paper-item>


which 1 considered best practice? better options?


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - VueJS2 and the Window Object - how to use? -