javascript - How to make a menu and submenu in AngularJS -
i trying display menu on page options file, edit, view, etc find in word document , when click on main menu item (file example), dropdown pops submenu options. thought basic behavior lot of uis have failing find examples of doing via angularjs. suggestions appreciated. in advance.
angular doesn't have widgets built-in. can either pull in jquery plug-in or use bootstrap achieve this.
this example assumes you're using bootstrap 2.3.2 , have created functions in controller:
<ul class="nav nav-pills"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">file <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#" ng-click="new()">new</a></li> <li><a href="#" ng-click="open()">open</a></li> <li><a href="#" ng-click="save()">save</a></li> <li><a href="#" ng-click="close()">close</a></li> </ul> </li> </ul>
Comments
Post a Comment