-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Documentation Feedback
Problem
Across various doc pages there are references to @NgModule based application providers.
- Components: 13 outstanding references across 9 markdown files to
@NgModulebased application providers in assorted component docs - CDK: 2 references in 2 files
- Material experimental: 1 reference in 1 file
- YouTube player: 2 references in 1 file
- Edit: after merely dropping an
@from the search, I see there is many more casual references to modules in various writeups. Maybe those are their own story, or tackled in this same proposed change?
Example: https://material.angular.dev/components/chips/overview#specifying-global-configuration-defaults
@NgModule({
providers: [
{
provide: MAT_CHIPS_DEFAULT_OPTIONS,
useValue: {
separatorKeyCodes: [COMMA, SPACE]
}
}
]
})New docs do use the standalone application providers syntax
Example https://material.angular.dev/components/timepicker/overview#setting-the-locale-code
bootstapApplication(MyApp, {
providers: [{provide: MAT_DATE_LOCALE, useValue: 'en-GB'}],
});Proposal
Convert all the module app providers examples to standalone app providers examples
Considerations
Is there any need to keep any references to module configurations anymore? IMO no, but I should ask before just making a PR.
Also, can/should these @NgModule blocks be updated without updating other module references that are inline with copy, like this:
components/src/cdk/menu/menu.md
Line 44 in c71256d
| Import the `CdkMenuModule` into the `NgModule` in which you want to create menus. You can then apply |
Affected documentation page
https://material.angular.dev/components/chips/overview#specifying-global-configuration-defaults