From 776cb5ce798bfb64a25ff94316bf9754e08b1a72 Mon Sep 17 00:00:00 2001 From: Marco Alvarado Date: Wed, 23 Nov 2016 10:16:28 -0700 Subject: [PATCH] docs(getting-started): specify HammerJS install instructions Change GETTING_STARTED.md to include more specific HammerJS install instructions. Closes #1889 --- GETTING_STARTED.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index 2f547f906138..2c0b7e7fb674 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -46,6 +46,20 @@ Add HammerJS to your application via [npm](https://www.npmjs.com/package/hammerj (such as the [Google CDN](https://developers.google.com/speed/libraries/#hammerjs)), or served directly from your app. +#### If you want to include HammerJS from npm, you can install it: + +```bash +npm install --save hammerjs +npm install --save-dev @types/hammerjs +``` + +Import HammerJS on your app's module. + +**src/app/app.module.ts** +```ts +import 'hammerjs'; +``` + ## Configuring SystemJS If your project is using SystemJS for module loading, you will need to add `@angular/material` to the SystemJS configuration: