Does some manual dirty checking on the native input `placeholder` attribute.
()
| 465 | |
| 466 | /** Does some manual dirty checking on the native input `placeholder` attribute. */ |
| 467 | private _dirtyCheckPlaceholder() { |
| 468 | const placeholder = this._getPlaceholder(); |
| 469 | if (placeholder !== this._previousPlaceholder) { |
| 470 | const element = this._elementRef.nativeElement; |
| 471 | this._previousPlaceholder = placeholder; |
| 472 | placeholder |
| 473 | ? element.setAttribute('placeholder', placeholder) |
| 474 | : element.removeAttribute('placeholder'); |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | /** Gets the current placeholder of the form field. */ |
| 479 | protected _getPlaceholder(): string | null { |
no test coverage detected