I'm pretty new in angular, so my question may looks simple or stupid, but I didn't found any solution. I have a collection in my controller (for example, a collection of integers) and I want to filter it and take items for which condition is true.
At first I tried this:
<div>{{myCollection.find(item => item === 2)}}</div>
and it didn't work. Then I found another approach (which one I don't like because I will always have only single element to show and there is no need in peretition):
<div ng-repeat="item in list | filter:{item === 2}">
<div>{{item}}</div>
</div>
And it also doesn't work. Here is JSBin with my efforts: http://jsbin.com/govovocace/1/edit?html,js,output
Is there any possible solution of my problem? Calculating the required field in controller and passing it to the view doesn't suit me (unfortunately).