Reputation: 107
My angular version is 1.4.7 and I wanted to use the angular-multiselect-dropdown plugin for selecting multiple values from dropdown. Most of the plugins support version >=1.5.x . If you could see cdnpkg and github
Are there any plugin that supports 1.4.x version for multiselect dropdown?
Thanks in advance.
Upvotes: 1
Views: 4214
Reputation: 1012
GO through this http://embed.plnkr.co/xWvfWYjaW7TThKZONkv5/ this is exactly what you want. You can try like this,it works :
var app = angular.module('test',[]);
app.controller('selectIssue',function($scope){
$scope.names = [{
name:"Rohit"
},
{
name:"Virat"
},
{
name:"Ritesh"
}];
$scope.selectedName = [];
})
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<body>
<div ng-app="test">
<div ng-controller="selectIssue">
<div>
<select multiple ng-model="selectedName" ng-options="name.name for name in names track by name.name"></select>
</div>
Selected value table :
<div>
<table border="1">
<tr>
<td>Name</td>
</tr>
<tr ng-repeat="n in selectedName">
<td>{{n.name}}</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
Upvotes: 0