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

Method _hasProjected

src/material/list/list-option.ts:248–255  ·  view source on GitHub ↗

Gets whether the given type of element is projected at the specified position.

(type: 'icons' | 'avatars', position: 'before' | 'after')

Source from the content-addressed store, hash-verified

246
247 /** Gets whether the given type of element is projected at the specified position. */
248 _hasProjected(type: 'icons' | 'avatars', position: 'before' | 'after'): boolean {
249 // If the checkbox/radio is shown at the specified position, neither icons or
250 // avatars can be shown at the position.
251 return (
252 this._getTogglePosition() !== position &&
253 (type === 'avatars' ? this._avatars.length !== 0 : this._icons.length !== 0)
254 );
255 }
256
257 _handleBlur() {
258 this._selectionList._onTouched();

Callers 2

_hasIconsOrAvatarsAtMethod · 0.95

Calls 1

_getTogglePositionMethod · 0.95

Tested by

no test coverage detected