Angular JS filtering a select / ng-options.

A simple example on how to filter a select and ng-options.

HTML

<div ng-app="myApp">
    <div ng-controller="ItemCtrl">
        
        <div>
            Defined values: <select ng-model="Name" ng-options="item.Name for item in Items | filter : removeNull"></select>
        </div>
        
    </div>
</div>

CSS

</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> 
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<style>

JavaScript

angular.module('myApp', []);

function ItemCtrl($scope){
    $scope.Items = [
        {Name: 'A', Value: null},
        {Name: 'B', Value: 1},
        {Name: 'C', Value: null},
        {Name: 'D', Value: 2},
        {Name: 'E', Value: 2},
        {Name: 'F', Value: 2}
    ];   
    $scope.removeNull = function(itm) {
     if(itm.Value)return itm; else return;
  };
};