angularjs - select multiple
http://angularjs.org/
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
<select id="myselection" multiple="true" ng-model="selectedColors" ng-options="c.name+' ('+c.shade+')' for c in colors"></select>
<div>
Selected Colors: {{selectedColors }}
</div>
</div>
JavaScript
var myApp = angular.module('myApp', []);
function MyCtrl($scope) {
$scope.colors = [{
name: 'black',
shade: 'dark'},
{
name: 'white',
shade: 'light'},
{
name: 'red',
shade: 'dark'},
{
name: 'blue',
shade: 'dark'},
{
name: 'yellow',
shade: 'light'}
];
$scope.selectedColors = [$scope.colors[0], $scope.colors[1]];
}