Skip to content

Commit 8ae8731

Browse files
committed
docs(getting-started): fix invalid hammerjs import
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 4778f49 commit 8ae8731

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

guides/getting-started.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
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+
### Follow these steps to begin using Angular Material
1010

11-
12-
### Step 1: Install Angular Material npm packages
11+
#### Step 1
12+
**Install Angular Material NPM packages**
1313

1414
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:
1515

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

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

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

3233
3. Set up browser animations for Angular Material:
3334

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

4849

49-
### Step 2: Display an example Angular Material component
50+
#### Step 2
51+
**Display an example Angular Material component**
5052

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

@@ -81,9 +83,11 @@ You should see the material slider component on the page.
8183
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.
8284

8385

84-
### Appendix: Installing [HammerJS](http://hammerjs.github.io/)
86+
### Appendix
87+
88+
#### Installing HammerJS
8589

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

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

9498
```ts
95-
import 'hammer.js';
99+
import 'hammerjs';
96100
```

0 commit comments

Comments
 (0)