You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(list): use light-weight tokens for injecting parent lists
Angular Material list items currently optionally inject a parent `MatNavList`
or `MatList`. This has the downside of retaining these tokens at runtime
because they are used for dependency injection as values.
We can improve this by using so-called light-weight tokens. These allow
us to continue injecting parent list or nav-lists, but without the
risk of retaining the `MatList` and `MatNavList` classes with their
factories.
This was already the case before Angular v9 with View Engine, but
the issue significance increases with Ivy where factories are now
directly attached to the classes (such as `MatList` or `MatNavList`).
Using light-weight tokens avoids this issue and gives us an additional
size improvement. Notably this won't be an improvement when an
application uses both the nav-list and standard `MatList`.
Related to https://github.com/angular/angular-cli/issues/16866. More
context on light-weight tokens in:
https://hackmd.io/@mhevery/SyqDjUlrU#.
0 commit comments