MCPcopy Create free account
hub / github.com/angular/components / ngDoCheck

Method ngDoCheck

src/cdk/scrolling/virtual-for-of.ts:263–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261 }
262
263 ngDoCheck() {
264 if (this._differ && this._needsUpdate) {
265 // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of
266 // this list being rendered (can use simpler algorithm) vs needs update due to data actually
267 // changing (need to do this diff).
268 const changes = this._differ.diff(this._renderedItems);
269 if (!changes) {
270 this._updateContext();
271 } else {
272 this._applyChanges(changes);
273 }
274 this._needsUpdate = false;
275 }
276 }
277
278 ngOnDestroy() {
279 this._viewport.detach();

Callers

nothing calls this directly

Calls 2

_updateContextMethod · 0.95
_applyChangesMethod · 0.95

Tested by

no test coverage detected