我正在尝试使用angular-material的md-autocomplete指令来搜索用户。用户可以过滤和显示列表,但我找不到在列表底部添加自定义按钮的方法。这个(“显示所有结果”)按钮将在每次搜索时显示一次,该搜索将重定向到另一个页面。
<md-autocomplete ng-disabled="vm.search.isDisabled" md-no-cache="vm.search.noCache" md-selected-item="vm.search.selectedItem"
md-search-text-change="vm.searchTextChange(searchText)" md-search-text="searchText" md-selected-item-change="vm.selectedItemChange(item)"
md-items="item in vm.userSearch(searchText)" md-item-text="item.displayName" md-min-length="1" md-clear-button="true" placeholder="Search"
md-menu-class="search-autocomplete-template">
<md-item-template>
<span md-highlight-text="searchText">{{item.displayName}}</span>
</md-item-template>
<md-not-found>
No matches found.
</md-not-found>
<md-button class="show-more-button" ng-click="vm.showMore()" >
<span>Show all results</span>
</md-button>
</md-autocomplete>