Skip to content

Commit f509e53

Browse files
authored
docs: update getting started (angular#29423)
1 parent ff36c80 commit f509e53

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

guides/getting-started.md

+7-15
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,19 @@ This guide explains how to set up your Angular project to begin using Angular Ma
44
information on prerequisites, installing Angular Material, and optionally displaying a sample
55
Material component in your application to verify your setup.
66

7-
*Angular Resources*
8-
9-
If you are new to Angular or getting started with a new Angular application, see
10-
[Angular's full Getting Started Guide](https://angular.io/start) and
11-
[Setting up your environment](https://angular.io/guide/setup-local).
12-
13-
For existing applications, follow the steps below to begin using Angular Material.
7+
This guide assumes that the [Angular CLI](https://angular.dev/tools/cli/setup-local#install-the-angular-cli) has already been installed.
148

159
## Install Angular Material
1610

17-
Use the Angular CLI's installation [schematic](https://material.angular.io/guide/schematics) to set
18-
up your Angular Material project by running the following command:
11+
Add Angular Material to your application by running the following command:
1912

2013
```bash
2114
ng add @angular/material
2215
```
2316

2417
The `ng add` command will install Angular Material, the
2518
[Component Dev Kit (CDK)](https://material.angular.io/cdk/categories),
26-
[Angular Animations](https://angular.io/guide/animations) and ask you the following questions to
19+
[Angular Animations](https://angular.dev/guide/animations) and ask you the following questions to
2720
determine which features to include:
2821

2922
1. Choose a prebuilt theme name, or "custom" for a custom theme:
@@ -36,7 +29,7 @@ determine which features to include:
3629

3730
3. Set up browser animations for Angular Material:
3831

39-
Importing the [`BrowserAnimationsModule`](https://angular.io/api/platform-browser/animations/BrowserAnimationsModule) into your application enables Angular's [animation system](https://angular.io/guide/animations). Declining this will disable most of Angular Material's animations.
32+
Importing the [`BrowserAnimationsModule`](https://angular.io/api/platform-browser/animations/BrowserAnimationsModule) into your application enables Angular's [animation system](https://angular.dev/guide/animations). Declining this will disable most of Angular Material's animations.
4033

4134
The `ng add` command will additionally perform the following actions:
4235

@@ -50,23 +43,22 @@ The `ng add` command will additionally perform the following actions:
5043

5144
You're done! Angular Material is now configured to be used in your application.
5245

53-
5446
### Display a component
5547

5648
Let's display a slide toggle component in your app and verify that everything works.
5749

5850
You need to import the `MatSlideToggleModule` that you want to display by adding the following lines to
59-
your `app.module.ts` file.
51+
your standalone component's imports, or otherwise your component's `NgModule`.
6052

6153
```ts
6254
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
6355

64-
@NgModule ({
56+
@Component ({
6557
imports: [
6658
MatSlideToggleModule,
6759
]
6860
})
69-
class AppModule {}
61+
class AppComponent {}
7062
```
7163

7264
Add the `<mat-slide-toggle>` tag to the `app.component.html` like so:

0 commit comments

Comments
 (0)