top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In Angular, What is the use for ngDocheck?

0 votes
440 views
In Angular, What is the use for ngDocheck?
posted Feb 8, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

ngDoCheck gets called to check the changes in the directives in addition to the default algorithm. The default change detection algorithm looks for differences by comparing bound-property values by reference across change detection runs.

@Component({selector: 'home-page', template: `...`})
class MyComponent implements DoCheck {
  ngDoCheck() {
    // ...
  }
}
answer Feb 26, 2018 by Sidharth Malhotra
...