I'm new to angularjs. I've 2 drop downs with same values in html. Here I want whenever user selects a value in first drop down then that value want to disable in second drop down.
var app = angular.module('plunker', [ 'ngRoute' ]);
app.controller('queryCntrl', function($scope) {
$scope.names = [ "Ali", "Raj", "Ahm", "Sbm", "Lvy" ];
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<title>Fund Transfer</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="lib/angular.min.js"></script>
<script src="lib/angular-route.min.js"></script>
<script data-require="[email protected]" src="https://code.angularjs.org/1.2.22/angular.js" data-semver="1.2.22"></script>
<script src="app.js"></script>
</head>
<body>
<div ng-controller="queryCntrl">
From <select ng-model="selectedName"
ng-options="x for x in names">
</select>
</div>
<div>
<br> To <select ng-model="selectedName"
ng-options="x for x in names">
</select>
</div>
</body>
</html>