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

Method ngAfterViewInit

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

Source from the content-addressed store, hash-verified

437 _inputPadding!: number;
438
439 ngAfterViewInit(): void {
440 if (this._platform.isBrowser) {
441 this._updateDimensions();
442 }
443
444 const eInput = this._getInput(_MatThumb.END);
445 const sInput = this._getInput(_MatThumb.START);
446 this._isRange = !!eInput && !!sInput;
447 this._cdr.detectChanges();
448
449 if (typeof ngDevMode === 'undefined' || ngDevMode) {
450 _validateInputs(
451 this._isRange,
452 this._getInput(_MatThumb.END),
453 this._getInput(_MatThumb.START),
454 );
455 }
456
457 const thumb = this._getThumb(_MatThumb.END);
458 this._rippleRadius = thumb._ripple.radius;
459 this._inputPadding = this._rippleRadius - this._knobRadius;
460
461 this._isRange
462 ? this._initUIRange(eInput as _MatSliderRangeThumb, sInput as _MatSliderRangeThumb)
463 : this._initUINonRange(eInput!);
464
465 this._updateTrackUI(eInput!);
466 this._updateTickMarkUI();
467 this._updateTickMarkTrackUI();
468
469 this._observeHostResize();
470 this._cdr.detectChanges();
471 }
472
473 private _initUINonRange(eInput: _MatSliderThumb): void {
474 eInput.initProps();

Callers

nothing calls this directly

Calls 10

_updateDimensionsMethod · 0.95
_getInputMethod · 0.95
_getThumbMethod · 0.95
_initUIRangeMethod · 0.95
_initUINonRangeMethod · 0.95
_updateTrackUIMethod · 0.95
_updateTickMarkUIMethod · 0.95
_observeHostResizeMethod · 0.95
_validateInputsFunction · 0.85

Tested by

no test coverage detected