小编Tho*_*mas的帖子

Angular UI bootstrap - 显示typeahead-no-results的下拉列表

尝试在没有结果的情况下得到一个下拉菜单,但下拉菜单不显示视图

<div class="dropdown">
    <div class="form-group">
       <input placeholder="Vælg kunde" type="text" ng-model="customer"  typeahead-editable="false" uib-typeahead="customer as customer.customer for customer in customers | filter:$viewValue | limitTo:8" class="form-control"
            typeahead-popup-template-url="customPopupTemplate.html"
            typeahead-min-length="0"
            typeahead-no-results="noResults">
    </div>

    <div ng-if="noResults" dropdown-toggle>
       <ul class="dropdown-menu" >
           <li><a href="#">No result</a></li>
       </ul>
    </div>

</div>
Run Code Online (Sandbox Code Playgroud)

删除class ="dropdown-menu"给了我没有结果的li,但是我不把它作为下拉菜单

谁没有结果我切换这个下拉菜单?

javascript twitter-bootstrap angular-ui-bootstrap angular-ui-typeahead

6
推荐指数
1
解决办法
2万
查看次数