Dynamically Add Items To An Mdl Menu
I want to dynamically add menu items to an mdl menu. However, I have not figured out how to register the new items with mdl so that they work properly. Here is a codepen showing th
Solution 1:
This sadly is currently pretty complicated and doing it will in fact have performance issues due to bugs. Not recommended.
The best thing to do would be to destroy the menu and rebuild it on-the-fly.
MDL is meant for more static sites, Polymer is recommended for sites needing more complex controls and dynamic building.
You could also go the route of not using our JS and writing your own component for this need.
Post a Comment for "Dynamically Add Items To An Mdl Menu"