MCPcopy Index your code
hub / github.com/angular/components / constructor

Method constructor

src/material/slider/slider.ts:416–432  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414 private _platform = inject(Platform);
415
416 constructor() {
417 inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
418
419 let prevIsRtl = this._isRtl();
420
421 afterRenderEffect(() => {
422 const isRtl = this._isRtl();
423
424 // The diffing is normally handled by the signal, but we don't want to
425 // fire on the first run, because it'll trigger unnecessary measurements.
426 if (isRtl !== prevIsRtl) {
427 prevIsRtl = isRtl;
428 this._isRange ? this._onDirChangeRange() : this._onDirChangeNonRange();
429 this._updateTickMarkUI();
430 }
431 });
432 }
433
434 /** The radius of the native slider's knob. AFAIK there is no way to avoid hardcoding this. */
435 _knobRadius: number = 8;

Callers

nothing calls this directly

Calls 5

_onDirChangeRangeMethod · 0.95
_onDirChangeNonRangeMethod · 0.95
_updateTickMarkUIMethod · 0.95
loadMethod · 0.80
_isRtlMethod · 0.45

Tested by

no test coverage detected