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

Function _appendInkBarElement

src/material/tabs/ink-bar.ts:167–181  ·  view source on GitHub ↗

* Appends the ink bar to the tab host element or content, depending on whether * the ink bar should fit to content.

()

Source from the content-addressed store, hash-verified

165 * the ink bar should fit to content.
166 */
167 private _appendInkBarElement() {
168 if (!this._inkBarElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
169 throw Error('Ink bar element has not been created and cannot be appended');
170 }
171
172 const parentElement = this._fitToContent
173 ? this._elementRef.nativeElement.querySelector('.mdc-tab__content')
174 : this._elementRef.nativeElement;
175
176 if (!parentElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {
177 throw Error('Missing element to host the ink bar');
178 }
179
180 parentElement!.appendChild(this._inkBarElement!);
181 }
182}
183
184/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected