I have an array of values with possible null. AngularJS displays those by default as a value, but I want to skip those values entirely.
Is my only option to create a filter or is there any other solution out there?
My code:
var app = angular.module('fooapp', []);
app.controller('FooController', function($scope) {
$scope.foo = [null, 'foo', 'bar'];
});
<body ng-app="fooapp">
<div ng-controller="FooController">
<select ng-model="foomodel" ng-options="f for f in foo"></select>
</div>
</body>
Here's a plunker: