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

Method constructor

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

Source from the content-addressed store, hash-verified

191 private readonly _destroyed = new Subject<void>();
192
193 constructor() {
194 const ngZone = inject(NgZone);
195
196 this.dataStream.subscribe(data => {
197 this._data = data;
198 this._onRenderedDataChange();
199 });
200 this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(range => {
201 this._renderedRange = range;
202 if (this.viewChange.observers.length) {
203 ngZone.run(() => this.viewChange.next(this._renderedRange));
204 }
205 this._onRenderedDataChange();
206 });
207 this._viewport.attach(this);
208 }
209
210 /**
211 * Measures the combined size (width for horizontal orientation, height for vertical) of all items

Callers

nothing calls this directly

Calls 3

_onRenderedDataChangeMethod · 0.95
attachMethod · 0.65
nextMethod · 0.45

Tested by

no test coverage detected