Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在内部添加搜索框<;选择>;带ng选项的标记_Html_Angularjs_Ng Options_Search Box - Fatal编程技术网

Html 如何在内部添加搜索框<;选择>;带ng选项的标记

Html 如何在内部添加搜索框<;选择>;带ng选项的标记,html,angularjs,ng-options,search-box,Html,Angularjs,Ng Options,Search Box,我需要添加搜索框内选择标记与ng选项 <select class="form-control" ng-model="modelname" ng-options="category.id as category.name for category in Categories ng-change="getSubCategory()"> <option><--search box should be here--></option> </s

我需要添加搜索框内选择标记与ng选项

    <select class="form-control" ng-model="modelname" ng-options="category.id as category.name for category in Categories ng-change="getSubCategory()">
<option><--search box should be here--></option>
</select>

当用户点击按钮时,您可以设置
搜索
值。 活样本:

模板:

 <label>
 Search Value: <input ng-model="filter">*emphasized text*
 </label><br>
 <label>
 Search Key:
 <select ng-model="key">
   <option value="$">Any</option>
   <option value="number">Student Number</option>
   <option value="region">Student Region</option>
 </select> 
 </label>
 <button ng-click="setfilter()">search</button>

您不能使用标准html。你必须创建一些定制的东西——沿着这些线的东西

<ul class="custom-select">
    <li class="custom-select__option" ng-repeat="o in $ctrl.options"><input type="search"/></li>
<ul>

这并不难创造,但这是你需要走的方向

使用Bootstrap选择实时搜索:谢谢shudham,但我需要在下拉列表中添加搜索框谢谢回答
<ul class="custom-select">
    <li class="custom-select__option" ng-repeat="o in $ctrl.options"><input type="search"/></li>
<ul>