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

Method _setTemplateLabelInput

src/material/tabs/tab.ts:167–175  ·  view source on GitHub ↗

* This has been extracted to a util because of TS 4 and VE. * View Engine doesn't support property rename inheritance. * TS 4.0 doesn't allow properties to override accessors or vice-versa. * @docs-private

(value: MatTabLabel | undefined)

Source from the content-addressed store, hash-verified

165 * @docs-private
166 */
167 private _setTemplateLabelInput(value: MatTabLabel | undefined) {
168 // Only update the label if the query managed to find one. This works around an issue where a
169 // user may have manually set `templateLabel` during creation mode, which would then get
170 // clobbered by `undefined` when the query resolves. Also note that we check that the closest
171 // tab matches the current one so that we don't pick up labels from nested tabs.
172 if (value && value._closestTab === this) {
173 this._templateLabel = value;
174 }
175 }
176}

Callers 1

templateLabelMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected