void detectChanges()

Checks the change detector and its children.

This can also be used in combination with detach to implement local change detection checks.

<!-- TODO: Add a link to a chapter on detach/reattach/local digest --> <!-- TODO: Add an example or remove the following description -->

Example

The following example defines a component with a large list of readonly data. Imagine, the data changes constantly, many times per second. For performance reasons, we want to check and update the list every five seconds.

We can do that by detaching the component's change detector and doing a local change detection check every five seconds.

See detach for more information.

Source

void detectChanges();