The filter in ng-repeat
behaves exactly as specified in filter
The string is used for matching against the contents of the array. All strings or objects with string properties in array that match this string will be returned. This also applies to nested object properties. The predicate can be negated by prefixing the string with !
You can find the angular comparison code here. I believe there is no simple workaround - it's not a regexp, the code only checks whether !
is the first character. Even a custom comparator won't work cause the !
will still do a negation.
The easiest workaround is to create your own $filter for filtering and stop using the filter
filter.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…