@@ -39,39 +39,27 @@ use a pre-built theme, or define your own custom theme.
39
39
40
40
:trident : See the [ theming guide] ( guides/theming.md ) for instructions.
41
41
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.
44
46
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
46
48
(such as the [ Google CDN] ( https://developers.google.com/speed/libraries/#hammerjs ) ), or served
47
49
directly from your app.
48
50
49
51
#### If you want to include HammerJS from npm, you can install it:
50
52
51
53
``` bash
52
54
npm install --save hammerjs
53
- npm install --save-dev @types/hammerjs
54
55
```
55
56
56
- Import HammerJS on your app's module.
57
-
57
+ After installing, import HammerJS on your app's module.
58
58
** src/app/app.module.ts**
59
59
``` ts
60
60
import ' hammerjs' ;
61
61
```
62
62
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
-
75
63
## Configuring SystemJS
76
64
If your project is using SystemJS for module loading, you will need to add ` @angular/material `
77
65
to the SystemJS configuration:
0 commit comments