forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(form-field): use injection token for providing form-field (angul…
…ar#18777) Implementers of custom form-field controls often want to inject the parent `MatFormField` optionally. This currently has negative impact as the whole `MatFormField` class w/ Angular metadata is brought in due to the class being used as injector token. This can be avoided by using a separate thin injection token called `MAT_FORM_FIELD`. We use this now in `MatSelect`, `MatAutocompleteTrigger` and `MatChipList`. These don't necessarily require a form-field, so it's a significant bundle size improvement. Another benefit is that the MDC-based form-field no longer needs to re-provide the standard `MatFormField` w/ the downside of bringing in a lot of unnecessary code.
- Loading branch information
1 parent
b2e8691
commit 8ec44a1
Showing
6 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters