You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
The <md-chips> and <md-contact-chips> directives can cause a stack overflow when the data objects have a circular reference. This worked up until RC2 when this fix(md-chips): appendChip disallows identical objects #4479 changed MdChipsCtrl.prototype.appendChip by adding a call to angular.equals() which doesn't support circular references. Here is a codepen (http://codepen.io/rich-j/pen/RWvymm?editors=101) that shows the issue. Try adding another "person" to the contact chips.
Angular's equals() function has several unimplemented requests for circular reference support:
Each "person" in our system is a single object that has references to related objects (e.g. parent/child, owner/member). We would like to pass these "person" instances directly to <md-contact-chips>. The Angular equals() function does work for object equality (i.e. same object references) however for unequal objects it can get stuck in a cycle since it unfortunately implements a depth first search on object properties.