angular/angular.js — pull request #6319 by brettshollenberger (2014-02-18 17:43:16+00:00)
Title: Fix(filter): Filter objects with circular references

Currently, filtering objects with circular references causes an infinite recursion. The `search` method calls itself with each key in a given object, so if two objects reference one another, this pair will cause a stack overflow. This fix will continue to look through the attributes of objects referenced by the object being filtered, but stops if one of the referenced objects re-references the original object.

I think that as Angular modeling libraries evolve (I've spent quite a bit of time on one https://github.com/FacultyCreative/ngActiveResource), that circular references like this will be common, as they are helpful when working with relationships between entities. Either way, I think it would be useful for filtering not to break due to circular references.