我想单击按钮下拉菜单,但是html不显示下拉列表。
<body ng-controller="appCtrl">
<br>
<div class="container" >
<button ng-repeat="item in buttons" type="button" class="btn" ng-class="item.isActive"
ng-click="activeButton(item)">{{item.name}}<span class="price"> {{item.price}}</span></button>
<div class="btn-group" uib-dropdown is-open="status.isopen">
<button id="single-button" type="button" class="btn btn-primary" uib-dropdown-toggle ng-disabled="disabled">
More <span class="caret"></span>
</button><p>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">
<li role="menuitem"><a >Pickup Truck</a></li>
<li role="menuitem"><a >Luxury</a></li>
<li role="menuitem"><a >Convertible</a></li>
<li role="menuitem"><a >Commercial</a></li>
</ul>
</div>
角度控制器功能
$scope.status = {
isopen: false
};
$scope.toggled = function(open) {
$log.log('Dropdown is now: ', open);
};
$scope.toggleDropdown = function($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.status.isopen = !$scope.status.isopen;
};
怎么做?