Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding track by for detecting changes of complex objects #36

Closed
ronyf opened this issue Jul 9, 2017 · 0 comments
Closed

adding track by for detecting changes of complex objects #36

ronyf opened this issue Jul 9, 2017 · 0 comments

Comments

@ronyf
Copy link

ronyf commented Jul 9, 2017

According to this issue there's a problem with one-way binding of complex objects.
Angular doesn't detect changes that happen within an object.
There are two solutions... making a clone of the object with angular.copy or adding track by

@Component()
class MyComponent {
  @Input('my-arr track by _id')  myArr: [MyObj];
  @Input('my-obj track by version') myObj: MyObj;
}

I tried applying the second solution using your decorators and it didn't work..
Is there a way to make it work?

@ronyf ronyf closed this as completed Jul 9, 2017
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

No branches or pull requests

1 participant