* Checks the view and its children. * * This can also be used in combination with ChangeDetectorRef#detach to implement * local change detection checks. * * <!-- TODO: Add a link to a chapter on detach/reattach/local digest --> * <!-- TODO: Add a live demo once ref.detectCh
()
| 305 | * See {@link ChangeDetectorRef#detach} for more information. |
| 306 | */ |
| 307 | detectChanges(): void { |
| 308 | // Add `RefreshView` flag to ensure this view is refreshed if not already dirty. |
| 309 | // `RefreshView` flag is used intentionally over `Dirty` because it gets cleared before |
| 310 | // executing any of the actual refresh code while the `Dirty` flag doesn't get cleared |
| 311 | // until the end of the refresh. Using `RefreshView` prevents creating a potential difference |
| 312 | // in the state of the LViewFlags during template execution. |
| 313 | this._lView[FLAGS] |= LViewFlags.RefreshView; |
| 314 | detectChangesInternal(this._lView); |
| 315 | } |
| 316 | |
| 317 | /** |
| 318 | * Checks the change detector and its children, and throws if any changes are detected. |
no test coverage detected