Angularjs filter negated

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?

'!' character prepend to the filter string, like below:

filter:'!'+languageOrigin

<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>

If using objects, you might also be interested in the following:

<li data-ng-repeat="obj in objs | filter:({obj_attr: '!obj_val'})">
   ...
</li>

Tested in AngularJS 1.1.5.

UPDATE: see ENDOH takanao's answer.

Looking at the AngularJS source code, it appears that '!' negates the result of the predicate, not the predicate itself:

var search = function(obj, text){
    if (text.charAt(0) === '!') {
       return !search(obj, text.substr(1));
    }
    switch (typeof obj) {
    ...

So, one way to work around this is to [If you don't like the '!'+myFilter syntax,] you can define your own predicate function in your controller:

$scope.inverseOriginFilter = function(item) {
    return item.search($scope.languageOrigin) == -1
}

Then use it in your HTML:

<select ng-model="languageDestination" ng-change="updatePrice()" 
    ng-options="language for language in languages | filter:inverseOriginFilter">
</select>

Example fiddle.

If you're using a method to filter than prefixing the method name with '!' will not work. Instead you can do something like:

// You can register this in your AppCtrl if you like, otherwise just use $scope.
$rootScope.not = function(func) {
    return function (item) { 
        return !func(item); 
    }
};

Then you do:

filter:not(myFilterMethod)

In your html it would look like:

<select ng-model="languageDestination" ng-change="updatePrice()">
  <option ng-repeat="language in languages | filter:not(languageOrigin)">{{language}}</option>
</select>

Reference: http://stackoverflow.com/a/17811582/175830

I'm using 1.3.15 and ENDOH's solution did not work. Instead, filter:'!':languageOrigin worked for me.