2017-01-10 99 views

回答

5

它不再需要解决方法。您可以添加multiple的选择:

<md-select placeholder="State" multiple> 
    <md-option *ngFor="let state of states" [value]="state">{{ state }}</md-option> 
</md-select> 

然后,它看起来是这样的:

enter image description here

enter image description here

+0

我很惊讶为什么这不是在文档! –

+0

'multiple'属性列在[API文档](https://material.angular.io/components/select/api)中,但我也必须搜索它。 –