Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Max Digest Iteration loop triggered by using ng-bind with a filter that returns an Array #9717

Closed
@btesser

Description

@btesser

When ng-bind is used, and the expression includes a filter that returns an array, angular enters an infinite digest loop and eventually cuts out after the 10 digest limit. I looked at the source and the issue is caused by the fact that ng-bind never uses object equality (angular.equals) to compare the new value and the old value in the watcher, rather since the filter is returning a new array, the old array is never equal and an infinite digest loop is caused.

The same expression will work if you use double curlies for binding rather than ng-bind

See plnkr which shows the bug in action.

http://plnkr.co/edit/t6B3uz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions