你好我有过滤我选择的问题。 当我尝试过滤它时,总会有相同的值。
代码:
var app = angular.module('myApp', []);
function ctrl($scope){
$scope.fltr='email';
$scope.options = [{"type":"url","url":"http//test/_projects/onion","name":"test/_projects/onion"},{"type":"url","url":"http//urlov.go","name":"urlov.go"},{"type":"email","url":"http//email.go","name":"email.go"},{"type":"onion","url":"http//onion.go","name":"onion.go"},{"type":"btc","url":"http//btc.go","name":"btc.go"}];
}
<select name="domain" ng-model="seldomain" class="form-control" ng-options="o.name group by o.type for o in options track by o.url | filter:{ type : fltr }"></select>
我小提琴: http://jsfiddle.net/6wkwjg4a/
任何想法都有帮助,感谢所有人。