A
A
Alexander Shirobokov2016-04-10 11:57:36
JavaScript
Alexander Shirobokov, 2016-04-10 11:57:36

How to track the change of an object in angular2?

In the first version, this was done through $scope.$watch(), but now how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valentine, 2016-04-10
@konrin

Changes can be tracked through the implementation of Observers from the rxjs library : Here is a good explanation of how to do this : href=" https://coryrylan.com/blog/angular-2-observable-da... "> . But there is a more attractive "wrapper" over Observers - Subject is also from the rxjs library , the principle of work is well shown in the cookbook: href=" https://angular.io/docs/ts/latest/cookbook/compone... "> (since working with Subject is only one of the examples, then through ctrl+f find Parent and children communicate via a service )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question