()
| 362 | } |
| 363 | |
| 364 | ngAfterViewInit() { |
| 365 | // Initial focus state sync. This happens rarely, but we want to account for |
| 366 | // it in case the form field control has "focused" set to true on init. |
| 367 | this._updateFocusState(); |
| 368 | |
| 369 | if (!this._animationsDisabled) { |
| 370 | this._ngZone.runOutsideAngular(() => { |
| 371 | // Enable animations after a certain amount of time so that they don't run on init. |
| 372 | setTimeout(() => { |
| 373 | this._elementRef.nativeElement.classList.add('mat-form-field-animations-enabled'); |
| 374 | }, 300); |
| 375 | }); |
| 376 | } |
| 377 | |
| 378 | // Because the above changes a value used in the template after it was checked, we need |
| 379 | // to trigger CD or the change might not be reflected if there is no other CD scheduled. |
| 380 | this._changeDetectorRef.detectChanges(); |
| 381 | } |
| 382 | |
| 383 | ngAfterContentInit() { |
| 384 | this._assertFormFieldControl(); |
nothing calls this directly
no test coverage detected