Skip to content

Commit 026c70a

Browse files
authored
docs(getting-started): update HammerJS instructions (#2383)
1 parent 33b152d commit 026c70a

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

guides/getting-started.md

+6-18
Original file line numberDiff line numberDiff line change
@@ -39,39 +39,27 @@ use a pre-built theme, or define your own custom theme.
3939

4040
:trident: See the [theming guide](guides/theming.md) for instructions.
4141

42-
### Additional setup for `md-slide-toggle` and `md-slider`:
43-
The slide-toggle and slider components have a dependency on [HammerJS](http://hammerjs.github.io/).
42+
### Additional setup for gestures
43+
Some components ()`md-slide-toggle`, `md-slider`, `mdTooltip`) rely on
44+
[HammerJS](http://hammerjs.github.io/) for gestures. In order to get the full feature-set of these
45+
components, HammerJS must be loaded into the application.
4446

45-
Add HammerJS to your application via [npm](https://www.npmjs.com/package/hammerjs), a CDN
47+
You can add HammerJS to your application via [npm](https://www.npmjs.com/package/hammerjs), a CDN
4648
(such as the [Google CDN](https://developers.google.com/speed/libraries/#hammerjs)), or served
4749
directly from your app.
4850

4951
#### If you want to include HammerJS from npm, you can install it:
5052

5153
```bash
5254
npm install --save hammerjs
53-
npm install --save-dev @types/hammerjs
5455
```
5556

56-
Import HammerJS on your app's module.
57-
57+
After installing, import HammerJS on your app's module.
5858
**src/app/app.module.ts**
5959
```ts
6060
import 'hammerjs';
6161
```
6262

63-
Finally, you need to add `hammerjs` to the `types` section of your `tsconfig.json` file:
64-
65-
```json
66-
{
67-
"compilerOptions": {
68-
"types": [
69-
"hammerjs"
70-
]
71-
}
72-
}
73-
```
74-
7563
## Configuring SystemJS
7664
If your project is using SystemJS for module loading, you will need to add `@angular/material`
7765
to the SystemJS configuration:

0 commit comments

Comments
 (0)