Notice the items.filter code fragment. This causes ng-annotate to stop working and triggers and error.
I cannot trace the original error because i installed 0.10.* node version, on which ng-annotate works.
I just tested your example with node-v0.12.0-darwin-x64 and ng-annotate 0.15.4 and it works fine. If you're able to repro again then please re-open and upload error message and versions you're using.
When using ng-annotate on newest node 0.12.*, there is a problem with parsing code like this:
angular.module('module',[])
.filter('filternName', function(selected, items) { if (!selected || !selected.length) { return items; } else { return items.filter(notSelected); } }) ;
Notice the items.filter code fragment. This causes ng-annotate to stop working and triggers and error. I cannot trace the original error because i installed 0.10.* node version, on which ng-annotate works.