One possible solution is to utilize a filter function in your AngularJS application.
`<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4928272e3c25283b67233a0978677d6731">[email protected]</a>" src="https://code.angularjs.org/1.4.3/angular.js" data-semver="1.4.3"></script>
<script src="app.js"></script>
<script>
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.user="admin";
$scope.list = [
{id:1,name:"first",tc:100},
{id:2,name:"second",tc:103},
{id:3,name:"third",tc:105}
]
console.log("hi");
console.log($scope.modes);
$scope.filterrole=function(item){
return $scope.user=="admin"?true:$scope.list[0]==item;
}
});
</script>
</head>
<body ng-controller="MainCtrl">
<div >
<div class="col-md-8 col-sm-12 col-xs-12">
<select ng-model="li" >
<option value="">select {{user}}</option>
<option ng-repeat="li in list |filter: filterrole">{{li.name}}</option>
</select>
</div>
</div>
<br>
<div><input type="button" value="admin" ng-click="user='admin'">
<input type="button" value="other" ng-click="user='other'"></div>
</body>
</html>`
http://plnkr.co/edit/orL8oLOKSm7H4DJwXQyx?p=preview