()
| 240 | private _currentIconFetch = Subscription.EMPTY; |
| 241 | |
| 242 | constructor() { |
| 243 | const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {optional: true}); |
| 244 | const defaults = inject<MatIconDefaultOptions>(MAT_ICON_DEFAULT_OPTIONS, {optional: true}); |
| 245 | |
| 246 | if (defaults) { |
| 247 | if (defaults.color) { |
| 248 | this.color = this._defaultColor = defaults.color; |
| 249 | } |
| 250 | |
| 251 | if (defaults.fontSet) { |
| 252 | this.fontSet = defaults.fontSet; |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is |
| 257 | // the right thing to do for the majority of icon use-cases. |
| 258 | if (!ariaHidden) { |
| 259 | this._elementRef.nativeElement.setAttribute('aria-hidden', 'true'); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * Splits an svgIcon binding value into its icon set and icon name components. |
nothing calls this directly
no outgoing calls
no test coverage detected