2015-11-01 87 views
0

側面導航我要側導航像這樣添加到我的身邊:如何添加聚合物

https://www.google.com/design/spec/material-design/introduction.html

應該有一個菜單按鈕和一個sidenav打開:

enter image description here

但我不能找到在polymer此方法。唯一的可能性是paper-drawer-panel但這運行結束一切的時候...

我的工作文件,抽屜面板例如:https://www.sese7.de/polymer/


是否有人有一個想法如何與聚合物或與可能做到這一點https://customelements.io/

預先感謝;)

回答

0

紙抽屜面板具有closeDrawer() -method。

短這裏例如:

var drawerPanel = Polymer.dom(document).querySelector('#paperDrawerPanel'); 

if (drawerPanel.narrow) { 
    drawerPanel.closeDrawer(); 
} 

的示例是從 「聚合物入門套件」。

+0

這隻適用於該網站的移動版本... –