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