The documentation for ng-repeat says:
the track should always be the last expression
So you need to change this line:
<div ng-repeat="item in items track by $index | filter:nm" ng-hide="hide">
:
<div ng-repeat="item in items | filter: nm track by $index" ng-hide="hide">
I know this is unclear, and this man catches people. Often the documentation is not on the page that you expect from it (for example, in a filter), but is still in a logical place (for example, ng-repeat). That should be all.
source share