Categories
How to do variable tracking in angular 4?
There is a variable @Input('isActive') public isActive: boolean; How to make tracking of its change. In 1-x it was possible to do this$scope.$watch('isActive' ...)
@Input('isActive') public isActive: boolean;
$scope.$watch('isActive' ...)
Answer the question
In order to leave comments, you need to log in
ngOnChanges in the controller. the first has an analogue of $onChanges. by the way $watch is deprecated in the latest versions of one
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question