我收到此错误"错误:md-input-container只能有一个 子输入,textarea或选择元素!"在尝试时 实现选择标题。
这是我的代码
<md-input-container>
<label>Vegetables</label>
<md-select ng-model="selectedVegetables" md-on-close="clearSearchTerm()" data-md-container-class="selectdemoSelectHeader" multiple="">
<md-select-header class="demo-select-header">
<input ng-model="searchTerm" type="search" placeholder="Search for a vegetable.." class="demo-header-searchbox _md-text">
</md-select-header>
<md-optgroup label="vegetables">
<md-option ng-value="vegetable" ng-repeat="vegetable in vegetables |
filter:searchTerm">{{vegetable}}</md-option>
</md-optgroup>
</md-select>
</md-input-container>
当我删除以下内容时,我没有收到任何错误。
<md-select-header class="demo-select-header">
<input ng-model="searchTerm" type="search" placeholder="Search for a vegetable.." class="demo-header-searchbox _md-text">
</md-select-header>
有谁知道我做错了什么或经历过同样的事情?