Create a dropdown component

前端 未结 6 1412
我寻月下人不归
我寻月下人不归 2020-12-08 15:39

I want to create a dropdown menu using Angular 2, but I\'m not sure how to do it in the \"Angular 2 way\".

I could create a dropdown component that is used like this

6条回答
  •  时光取名叫无心
    2020-12-08 16:24

    This might not exactly you want but I've used jquery smartmenu(https://github.com/vadikom/smartmenus) to build a ng2 dropdown menu.

     $('#main-menu').smartmenus();
    

    http://plnkr.co/edit/wLqLUoBQYgcDwOgSoRfF?p=preview https://github.com/Longfld/DynamicaLoadMultiLevelDropDownMenu

提交回复
热议问题