S
S
Sergey2017-05-19 19:10:04
Angular
Sergey, 2017-05-19 19:10:04

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' ...)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
ozknemoy, 2017-05-19
@Sergamers

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 your question

Ask a Question

731 491 924 answers to any question