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

Function constructor

src/material/list/list-base.ts:180–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 }
179
180 constructor() {
181 inject(_CdkPrivateStyleLoader).load(_StructuralStylesLoader);
182 const globalRippleOptions = inject<RippleGlobalOptions>(MAT_RIPPLE_GLOBAL_OPTIONS, {
183 optional: true,
184 });
185 this.rippleConfig = globalRippleOptions || {};
186 this._hostElement = this._elementRef.nativeElement;
187 this._isButtonElement = this._hostElement.nodeName.toLowerCase() === 'button';
188
189 if (this._listBase && !this._listBase._isNonInteractive) {
190 this._initInteractiveListItem();
191 }
192
193 // If no type attribute is specified for a host `<button>` element, set it to `button`. If a
194 // type attribute is already specified, we do nothing. We do this for backwards compatibility.
195 // TODO: Determine if we intend to continue doing this for the MDC-based list.
196 if (this._isButtonElement && !this._hostElement.hasAttribute('type')) {
197 this._hostElement.setAttribute('type', 'button');
198 }
199 }
200
201 ngAfterViewInit() {
202 this._monitorProjectedLinesAndTitle();

Callers

nothing calls this directly

Calls 1

loadMethod · 0.80

Tested by

no test coverage detected