In angular 1, The code was written like this.
**AngularJS**:
scope.$watch('hiddenScroll', () => {
$timeout(this.updateFadersVisibility());
});
**Angular 6**
ngOnChanges(changes: any) {
setTimeout(() => {
this.updateFadersVisibility();
}, 1000);
}
我正在寻找更好的解决方案。 ngOnChanges无法正常工作。