Skip to content

Conversation

@kkolstad-trov
Copy link

My company is using angular-deckgrid and we ran into issues with the watcher being too complex because we have circular references in our objects. This PR allows you to supply a function which is used to create a string that will be used as the watch expression.

@mikepugh
Copy link

I'm running into a similar need +1 this PR

@wakandan
Copy link

I'm having a similar issue with circular dependency. The deck can still render, but only after a long and painful list of RangeError: Maximum call stack size exceeded errors. I found out it might be because of this line 197 in the code:

watcher = this.$$scope.$watch('model', this.$$onModelChange.bind(this), true);

The deep watch over here is makes circular dependency not work. While in my company usecase, I changed it to $watchCollection and remove true it works fine, I'm wondering what may be other cases in which true param at the end might be useful.

I could create a PR to make this change but I'm unsure if this's the intended usecase.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants