Skip to content

Commit ccef0da

Browse files
Splaktarjelbourn
authored andcommitted
docs(getting-started): fix invalid hammerjs import (#17093)
improvements to header hierarchy and auto-generated anchors - new anchor `/guide/getting-started#step-1` - old anchor `/guide/getting-started#step-1-install-angular-material-npm-packages` add link to hammerjs appendix entry builds upon changes in PR #16654
1 parent 7cf3df7 commit ccef0da

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

guides/getting-started.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
This guide explains how to setup your Angular project to begin using Angular Material. It includes information on prerequisites, installing Angular Material, and optionally displaying a sample material component in your application to verify your setup.
44

5-
### New to Angular ?
5+
*Angular Resources*
66

77
If you are new to Angular or getting started with a new Angular application, see [Angular's full Getting Started Guide](https://angular.io/start) and [Setting up your environment](https://angular.io/guide/setup-local).
88

9-
For existing applications, follow the steps below to begin using Angular Material:
9+
For existing applications, follow the steps below to begin using Angular Material.
1010

11-
12-
### Step 1: Install Angular Material npm packages
11+
### Install Angular Material
1312

1413
Use the Angular CLI's install [schematic](https://material.angular.io/guide/schematics) to set up your Angular Material project by running the following command:
1514

@@ -27,7 +26,8 @@ The `ng add` command will install Angular Material, the [Component Dev Kit (CDK)
2726

2827
[HammerJS](http://hammerjs.github.io/) provides gesture recognition capabilities required by some components (`mat-slide-toggle`, `mat-slider`, `matToolTip`).
2928

30-
Please note, if you choose not to install HammerJS it can be installed later (see Appendix).
29+
Please note, if you choose not to install HammerJS it can be installed later
30+
(see [Appendix](#installing-hammerjs)).
3131

3232
3. Set up browser animations for Angular Material:
3333

@@ -46,7 +46,7 @@ The `ng add` command will additionally perform the following configurations:
4646
You're done! Angular Material is now configured to be used in your application.
4747

4848

49-
### Step 2: Display an example Angular Material component
49+
### Display a component
5050

5151
Let's display a slider component in your app and verify that everything works.
5252

@@ -81,9 +81,11 @@ You should see the material slider component on the page.
8181
In addition to the install schematic, Angular Material comes with [several schematics](https://material.angular.io/guide/schematics) (like nav, table, address-form, etc.) that can be used to easily generate pre-built components in your application.
8282

8383

84-
### Appendix: Installing [HammerJS](http://hammerjs.github.io/)
84+
### Appendix
85+
86+
#### Installing HammerJS
8587

86-
HammerJS can be installed using the following npm command:
88+
[HammerJS](http://hammerjs.github.io/) can be installed using the following npm command:
8789

8890
```bash
8991
npm install --save hammerjs
@@ -92,5 +94,5 @@ HammerJS can be installed using the following npm command:
9294
After installing, import it on your app's entry point (e.g. `src/main.ts`).
9395

9496
```ts
95-
import 'hammer.js';
97+
import 'hammerjs';
9698
```

0 commit comments

Comments
 (0)