How am I supposed to implement multiple select option in angular-material?

Check out chips

You can apply your own custom template as well.


You can look at the docs for the directive here.

Attributes

multiple (optional): boolean - Whether it's multiple.

<md-select ng-model="someModel" placeholder="Select a state" multiple="true">
    <md-option ng-value="opt" ng-repeat="opt in neighborhoods2">{{ opt }}</md-option>
</md-select>

If this doesn't work, I've heard that md-multiple might work but that the docs just aren't updated yet. I haven't been able to verify this yet though.


Splaktar's answer is correct: Just add multiple to your md-select.

Codepen for working solution: http://codepen.io/ansgar-john/pen/RWPVEO?editors=101

HTML

<div>
  <md-input-container>
    <md-select multiple ng-model="ctrl.likedAnimals" placeholder="please select">
      <md-option ng-repeat="a in ctrl.animals" value="{{a}}">{{a}}</md-option>
    </md-select>
  </md-input-container>
</div>

JS

(function () {
  'use strict';
  angular
      .module('MyApp')
      .controller('AppCtrl', function($scope) {
        this.likedAnimals = ["mouse", "dog"];
        this.animals = ["mouse", "dog", "cat", "bird"];
  });
})();

Code based on Stack Overflow answer: How am I supposed to implement multiple select option in angular-material?