Select more than one item in select or something similar angularjs

1

I need to select more than one option in my select or something like it, is there a possibility?

<select ng-model="modelcompraevenda.filial" class="form-control" >
      <option  ng-selected="data.unit == 1"  ng-selected="true" 
               ng-repeat="x in modelcompraevenda.listFiliais" 
               value="{{x.idFilial}}">{{x.nomeFilial}}>
      </option>
</select>
    
asked by anonymous 03.10.2017 / 21:23

1 answer

1

Gabriel,

As @Sergio said, you can use the multiple component in your select .

(function(angular) {
  angular.module('app', []).controller('ctrl', ['$scope', function($scope) {}]);
})(window.angular);
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script><divng-app="app">
  <div ng-controller="ctrl">
    <select ng-model="selecionados" multiple>
      <option value="1">Valor 1</option>
      <option value="2">Valor 2</option>
      <option value="3">Valor 3</option>
    </select>
    <p>MultiSelect Selecionados = {{selecionados}}</p>
  </div>
</div>

You can replace Option with your ng-repeat normally.

Enjoy and read more about Select on AngularJS

    
03.10.2017 / 22:21