javascript - Tabs with dropdowns angular ui -
i trying create application angularjs, angular ui , bootstrap 3. need create new tabs on fly adding object array.
<div ng-controller="personctrl"> <button ng-click="addperson()">add person</button> <button ng-click="removeperson()">remove person</button> <tabset> <tab ng-repeat="p in persons" heading="{{[p.name}}"> </div> </tab> </tabset> </div>
instead of buttons add , remove want add dropdown tab end. see plunk... http://plnkr.co/edit/gtug3ucs2wzvezposiaj?p=preview
look @ this example in plunker. may you.
<div class="bs-example"> <ul class="nav nav-pills"> <li ng-repeat="p in persons"><a href="#">{{p.name}}</a></li> <li class="dropdown"> <a href="#" data-toggle="dropdown" class="dropdown-toggle">action <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a ng-click="addperson()" href="#">add person</a></li> <li><a ng-click="removeperson()" href="#">remove person</a></li> </ul> </li> </ul> </div>
Comments
Post a Comment