Patrick Muñoz Vargas Patrick Muñoz Vargas - 11 months ago 183
HTML Question

md input container throwing error when I put input tags as child

Trying to use the following code from the Angular examples page:

<md-select ng-model="selectedVegetables"
<md-select-header class="demo-select-header">
<input ng-model="searchTerm"
placeholder="Search for a vegetable.."
class="demo-header-searchbox md-text">
<md-optgroup label="vegetables">
<md-option ng-value="vegetable" ng-repeat="vegetable in vegetables |

But this is the error I get:

Error: can only have one child input, textarea or select element!

The example can be found here (look for Select Header):

Answer Source

Well as i said on the comments the problem was the version of your Angular-material

Try to update it to the lastest version 1.0.9 or 1.1.0 and make a try.

<!-- Angular Material Library -->
<script src="">