3

I want to set the tags in in drop down usning select2. Like i want to put custom e-mail or anything else then it should show as tag. I am sharing the jsfiddle.

<div ng-controller="MyCtrl">
    <label>Please select items:</label>
    <select ui-select2 multiple ng-model='selectedDaltons'>
        <option ng-repeat="d in daltons" ng-bind="d" value="{{ d }}"></option>
    </select>
</div>




var myApp = angular.module('myApp', ['ui.select2']);

function MyCtrl($scope) {
    $scope.daltons = [
        'Joe',
        'William' ,
        'Jack' ,
        'Averell' ,
        'Ma' 
    ];    
    $scope.selectedDaltons = 'joe'; // Averell is preselected 
};

http://jsfiddle.net/hWXBv/179/

0

1 Answer 1

2

In ui-select, you can use the 'tagging' feature, you can even set the tagging-label. Check out this link

https://github.com/angular-ui/ui-select/wiki/ui-select

And this plunker:

http://plnkr.co/edit/m1SQXUxftBLQtitng1f0
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.