Skip to content

Commit 1ef3463

Browse files
docs: update remaining NgModule prose references to standalone pattern (#32825)
Several documentation files still referenced NgModule in prose when describing how to import directives and modules. Update these to reflect the modern standalone component pattern: - autocomplete.md: "into your NgModule" -> "in your component" - listbox.md: "CdkListboxModule into the NgModule" -> standalone imports - icon.md: "HttpClientModule in your NgModule" -> "provideHttpClient()" - menu.md: "CdkMenuModule into the NgModule" -> standalone imports This is a follow-up to the code block conversions in #32815. Closes #32709
1 parent 571a872 commit 1ef3463

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/cdk/listbox/listbox.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In addition to CSS classes, these directives add aria attributes that can be tar
4444

4545
### Getting started
4646

47-
Import the `CdkListboxModule` into the `NgModule` in which you want to create a listbox. You can
47+
Import `CdkListbox` and `CdkOption` in the component where you want to create a listbox. You can
4848
then apply listbox directives to build your custom listbox. A typical listbox consists of the
4949
following directives:
5050

src/cdk/menu/menu.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ The available CSS classes are listed below, by directive.
4141

4242
### Getting started
4343

44-
Import the `CdkMenuModule` into the `NgModule` in which you want to create menus. You can then apply
45-
menu directives to build your custom menu. A typical menu consists of the following directives:
44+
Import `CdkMenu`, `CdkMenuItem`, and `CdkMenuTrigger` in the component where you want to create
45+
menus. You can then apply menu directives to build your custom menu. A typical menu consists of the following directives:
4646

4747
- `cdkMenuTriggerFor` - links a trigger element to an `ng-template` containing the menu to be opened
4848
- `cdkMenu` - creates the menu content opened by the trigger

src/material/autocomplete/autocomplete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ track the value of the input.
1616

1717
> Note: It is possible to use template-driven forms instead, if you prefer. We use reactive forms
1818
in this example because it makes subscribing to changes in the input's value easy. For this
19-
example, be sure to import `ReactiveFormsModule` from `@angular/forms` into your `NgModule`.
19+
example, be sure to import `ReactiveFormsModule` from `@angular/forms` in your component.
2020
If you are unfamiliar with using reactive forms, you can read more about the subject in the
2121
[Angular documentation](https://angular.dev/guide/forms/reactive-forms).
2222

src/material/icon/icon.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ In order to guard against XSS vulnerabilities, any SVG URLs and HTML strings pas
5252
`MatIconRegistry` must be marked as trusted by using Angular's `DomSanitizer` service.
5353

5454
`MatIconRegistry` fetches all remote SVG icons via Angular's `HttpClient` service. If you haven't
55-
included [`HttpClientModule` from the `@angular/common/http` package](https://angular.dev/guide/http)
56-
in your `NgModule` imports, you will get an error at runtime.
55+
included [`provideHttpClient()`](https://angular.dev/guide/http) in your app config, you will get
56+
an error at runtime.
5757

5858
Note that `HttpClient` fetches SVG icons registered with a URL via `XmlHttpRequest`, subject to the
5959
[Same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy). This

0 commit comments

Comments
 (0)