I have a set of items that I want to filter in ng-repeat using an ng-model as the string to filter the set, so far I haven't found a way to make it work when the expression is negated, I'm doing something like this:
<select ng-model="languageOrigin" ng-change="updatePrice()">
<option ng-repeat="language in languages">{{language}}</option>
</select>
<select ng-model="languageDestination" ng-change="updatePrice()">
<option ng-repeat="language in languages | filter:!languageOrigin">{{language}}</option>
</select>
In the documentation, it says that we should use ! to negate the expression but still no luck.
What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…