# Select2 ## select2 (jQuery) ```
``` ``` @javascript jQuery(function($) { $('#select2-example').select2(); }); ``` ## ui-select (Angular) ```
{{$select.selected.name}}
email: {{person.email}}
``` ## ui-select (Angular): multiple ```
{{$item.name}}
email: {{person.email}}
``` ``` @javascript angular.module('openproject').controller('UiSelectExample', ['$scope', function($scope) { $scope.disabled = undefined; $scope.enable = function() { $scope.disabled = false; }; $scope.disable = function() { $scope.disabled = true; }; $scope.person = {}; $scope.people = [ { name: 'Adam', email: 'adam@email.com' }, { name: 'Amalie', email: 'amalie@email.com' }, { name: 'Wladimir', email: 'wladimir@email.com' }, { name: 'Samantha', email: 'samantha@email.com' }, { name: 'Estefanía', email: 'estefanía@email.com' }, { name: 'Natasha', email: 'natasha@email.com' }, { name: 'Nicole', email: 'nicole@email.com' }, { name: 'Adrian', email: 'adrian@email.com' } ]; $scope.selectedPeople = [$scope.people[5], $scope.people[4]]; }]); ```